If you give access to something you don't understand, then yes, your Mac might get a virus. However, if you're vigilant and know what or who is asking to access your Mac, then you'll be safe.
Watch the video: https://kiakamgar.com/can-your-mac-get-a-virus
Join the newsletter: https://kiakamgar.com/newsletter
Support the podcast: https://kiakamgar.com/support