Unfortunately, being a bit of a noob to the world of RPGs, I mistakenly left my character wide-open to Mages, even now after trying to repair and train past it they still always get one over on me, utilising Become Ethereal was the most useful thing I did in the game. Haven't used it much on my Archery and Mage builds though
The mages are powerful in this game regardless. Obscenely powerful they could easily be considered the most powerful enemies this game offers.
Try to get some gear with magical protection you can loot it or buy it.
If it suits your character build enchant some gear of your own.
There is a shield perk for magical resistance if the shield suits your build.
Wards in restoration help too.
Then their is the magical resistant perks in alteration there is several ways to combat it.
Remember there is no wrong way to create your character you just have to be more careful in certain areas if some things do not suit your build.