Lord - not trying to start a Windows flame session - but some operating systems are less vulnerable/targeted than others.
Windows update is a line of defense. While far from perfect, the unfortunate fact is that a lot of hacks come in thru holes long patched in the OS. So yeah, if you're running Windows - keep those updates turned on.
The other protection against ransomware is to have backups of everything you care about. Then, if your harddrive gets encrypted and ransomed, you don't care. Wipe it and install the OS fresh.
Windows likes (needs) a fresh install every couple of years. ;)