I knew this already and many are suggesting linux instead of windows. But I'll stay for now in windows the laptop that I'm using before is now my hardware wallet with electrum on it. And I'm only connecting it to internet just for synchronizing. Actually, it depends on the user if he isn't visiting any site that contains these malicious spywares, you are safe. Just be a responsible surfer and you'll be fine.
This is generally true. Wallet stealing malware has much more to do with irresponsible security practices and social engineering than anything else. The people that fall victim to it are usually those downloading anything and everything (such as altcoin wallets that are actually malware or random email attachments) onto machines that hold coins.
The primary defenses on an internet-connected machine: 1) rarely downloading anything, and when you do, only do so from a trusted source and check signatures. 2) Be careful clicking links and surfing in general. If you have coins at risk, you shouldn't be treating your computer as if it were a throwaway.
You should keep most of your coins offline, anyway. And you should also have a throwaway machine (or phone/tablet) for visiting sites that may be insecure, or for downloading torrents, etc.
I don't buy into the Linux vs. Windows argument. If you have bad security practices, you will lose your coins on Linux, too. If you think malware doesn't exist (or cannot exist) for Linux, you are mistaken. There is far less malware because hardly any end users use Linux.