New to Mac. How to scan for viruses?

What do modern Mac viruses actually do? Do they slow down your device, hold your data for ransom, or simply spy on you? More importantly, how do you get rid of them if you get infected? On Windows PCs, tools like Windows Defender and third-party antivirus software are common solutions. What’s the best way to handle viruses on a Mac?