Don't kid yourself.
Apple software is not open source. Trusting Apple to do a better job of protecting you than Microsoft is folly.
If anything, Apple's lack of anonymity makes you more vulnerable.
The main reason for MacOS's perceived lack of need for anti-virus is because malware writers target the larger market share.
I have read this often. But the second reason is apple used a lot of linux to build macOS and it is harder to hack than a windows.
That's wrong.
Apple used FreeBSD, not Linux. They thankfully contributed to quite a bunch of opensource projects like cups, but their OSX is a forked off FreeBSD sources.
..and Linux has become a similar cancer to Windows since most distros adapted to systemd (whos author now works at Microsoft) .
Correct, but they decided to redact more and more of the BSD subsystem to get replaced with their own crap, with each upgrade since 10.4 (Tiger, wasn't it?).
At 10.8 or .9 it became such a joke (for me and my purposes, as a unix geek) and i needed to run some windows-only sound engineering software, so i gave Windows a chance again.