A free antivirus program will give you some protection, but a paid anti-malware program like Malwarebytes for Mac can detect and block malware before it gets on your Mac.