Every software has holes. Not saying macOS is bullet proof. But it’s much harder to infect thanks to its Unix core and the fact the entire OS is on a read only partition. That with their own anti malware tool (Gatekeeper) that took on a much more active roll in macOS’s defenses come Ventura.
I’m far more worried Apple replaces macOS or closes it just like all their other OSes and we end up bouncing between jailbreaks.