I tested the fan and there is power. However the switch to the fan has no power. The light switch next to the fan switch is working. Could there be a problem between the exhaust fan and the switch to block the power?
I have repaired dozens if not hundreds of bathroom fans, flick the fan if it doesn’t spin for at least 5 seconds it needs lubricant, most are sleeved bearings and some wd40, or 3 in 1 oil may bring it back to life , I get slammed for suggestions of wd40 but it works to free things up in oil light bearings, a few drops of 15 to 40 weight motor oil will also work but it may take longer. I have got vent fans going many times with light oil or penetrating oil and even wd40 has lasted for a year or2 but a light oil is better