It just isn’t viable to create sophisticated malware for an OS that has a 2% market share unless you have a very specific target in mind. Add to this that the average Linux user will have a better knowledge of what’s going on in their system and it just isn’t very attractive to bad actors.
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.