bathroom fan does not turn on, just hums for 2 minutes then finally starts up
I don't disagree that replacing the fan is likely the best long-term solution, but it is possible that the fan's intermittent failure to start is due to dust. Starting up from a still position is the hardest a fan needs to "work", and dust buildup could be adding too much extra resistance on the fan rotor, preventing it from starting. You would hear a similar humming sound in any electric motor which has power applied but cannot turn over.

Why would this happen intermittently? One possible explanation would be that the fan rotor "lands" in a random place in its 360 degree range of movement each time, so sometimes it lands in a better or worse spot vis-à-vis dust buildup.

You could try using a can of compressed air to dislodge built-up dust inside the fan. It might relieve the problem, for a little while.

But the motor may be going bad due to the extra resistance of all the dust, so it will probably take less and less resistance to prevent it from starting as time goes on. At this point it is probably getting bad and should be replaced. (Maybe blowing out the dust will help you for a little while, though)