That is precisely what most of the Windows updates are doing, fixing something, especially security holes. The recent WannaCry ransomware attack was only a threat to those that hadn't updated their OS, for example. No version of Windows is completely immune to viruses and malware, however, each version is more secure than the last.