Something I get asked a lot is, "Mac computers are immune to viruses/malware, right?"
This is actually not the case. I'm not sure I'd ever say it really was, although for a long time the reality was that there simply wasn't much (if any) malware out there that could/would infect Mac computers. While it could be said that the design of MacOS is based on better security practices, it was never inherantly "immune" and these days most malware exploits a different weakness common to all operating systems: the user. Things like ransomware manage to trick the user into themselves infecting their own computer, versus some flaw of the operating system to automatically infect and spread.
Case in point is this recent news from the BBC about a new wave of ransomware designed to specifically target Mac computers. With the growth of popularity of malware as well as Mac computers in general, the threat of malware on Mac computers will grow in turn.