Over time, it can become clogged and cause the filter to emit unpleasant smells.
Clean the coils: The condenser and evaporator coils can also become dirty over time, leading to bad smells. To clean the coils, turn off the power to the AC unit, remove the cover, and use a soft brush or a vacuum cleaner to remove any dirt or debris.
Disinfect the unit: Mold and mildew can also cause bad smells. Use a solution of one part water and one part white vinegar to clean the coils, air filter, and other parts of the AC unit.
Change the air filter regularly: Make sure to do it regularly, ideally every 2-3 months, to avoid the build-up of dirt and debris.
Note that if the smell persists after trying these methods, it could be a sign of a major problem, like a mold infestation. So it's best to consult a professional AC services company for further diagnosis and treatment.