It’s not just that... The way linux is structured makes it much more secure. You are never autologged in as administrator at boot, always as guest. And the system is locked up safe on a whole different partition from user files, and it has to be rooted to make any changes at all. Illegal hackers run Linux for very good reason of security themselves.
A comparison would be the difference between a proprietary locked cell phone and an unlocked cell phone. It is very very difficult to root and unlock a proprietary phone. Same with the Linux kernel.
Consider this fact... Almost 100% of web servers on the internet are now Linux for two reasons, one linux can do much more with much less faster, and because of the inherent structured security.
“Almost 100% of web servers on the internet are now Linux”
Actually, that is a statement often repeated, but not true.
It is still pretty much a mix of everyone.