I've been running stock Mac OS for almost 10 years now. MacBook Pro at home and at work. I haven't had any viruses, malware, or ransomware. That's just my experience and doesn't mean this is a safe configuration.
Mostly, security these days is securing your cloud accounts. I use two factor authentication on my Apple, Google, and DropBox accounts.
I use Firefox as my primary browser. It's configured to delete all cookies and browsing history when I restart.
https://github.com/drduh/macOS-Security-and-Privacy-Guide