Really?
“Bug” relate more to system softwary errors, either from macOS or from applications, Apple’s or third party. Infections from the internet are more generally known as malware or viruses, and don’t get complacent, there are heaps of them that are targeting Macs. The days of Macs being immune to viruses are long gone.
Why do you think Apple created XProtect, Gatekeeper, MRT, TCC, etc., etc. They also encourage you to enable FileVault. The forthcoming macOS Monterey will offer more (not necessarily better) protection with Private Relay, Hide My Email, as well as offering iCloud+ subscribers use of proxy e-mail addresses. For those struggling with VPN, these might be a better privacy solution.
Apple even has the Bug Bounty Program which offers rewards to “hackers” who can reveal vulnerabilities in their systems.