Macs do get malware, if a user is careless. A virus is a self-replicating type of malware. There are no viruses in the wild for the macOS. Malware is the major heading, virus is a subset. Many people seem to use Virus as the major heading. It's not "just semantics" as the saying goes.* Malware, yes... virus, no.
And yes, being smart online is enough to protect your Mac.
*Actually, it is semantics, literally. The saying "quoted" is nonsense.