No OS is immune to a virus, Mac just gets less air time because there are so relative few.
I've been a Windows user almost exclusively, except for the occasional playing around with linux for S's&G's.
I can count on one hand the number of serious virus issues I've had and still have a couple fingers free. And most of those were in, my, um, younger more experimental days.
These days the scanner picks up little if anything. It most used feature is blocking/warning me of the occasional website I come across in Google searches.