A bathroom exhaust fan usually runs quietly until it does not. A rattle, a fan that spins slowly, or a grille that stays damp can point to dust, a loose mount, or a motor that is wearing out. Some of that is work a homeowner can do safely, and some belongs with a licensed electrician. The line between the two is the decision in front of you.
What you can reasonably do yourself
Start with the grille. Turn the fan off at the wall switch, then remove the cover and vacuum the lint from the grille and from the visible part of the housing. Dust on the blades is often the whole reason for the rattle. Wipe the cover clean, put it back, and run the fan for a few minutes to hear whether the sound has gone.
Where the job changes hands
Stop if the wiring looks scorched, if the switch is warm or buzzes, or if you would have to work near live connections to finish the job. Turn the breaker off before you touch any electrical part, and if you cannot confirm that the power is off, leave the work to an electrician. A replacement motor, a new duct run, or any change to the wiring is usually a licensed-trade job, and your plan's terms may say the same.
Check the plan before you pick up the screwdriver
Some home warranty contracts ask the homeowner to keep up routine maintenance and to keep records of it. A claim can be questioned if the contract calls for upkeep that was not done, or if a part was changed by someone outside the terms. Read the maintenance clause in your own contract before you start, and keep a note of what you cleaned and when. The contract is the authority here, not this article. If the wording is unclear, ask the company in writing what it counts as routine maintenance.
A short decision list
Do it yourself: clean the grille and the visible blades with the power off, and replace a worn grille cover. Hire it out: any electrical repair, any motor or wiring replacement, and any work inside a housing you cannot see clearly. Keep a record either way, so that a later claim shows the work was done in the way the contract describes.