AC ducts in a car accumulate dirt and harmful bacteria/germs over the course of driving and usage and can cause not only bad odour but also harmful for the health of the passengers inside the cabin.
One of the easiest ways to neutralize bad odours from the car AC as well as disinfect uses a foam based sanitizer (popularly known as AC duct sanitization or cleaning).
The AC ducts in the car are sprayed with ac sanitizer foam (through the AC vents) so the foam spreads through the entire ducting. The foam is allowed to settle down for at least 10 minutes and absorb all the dirt and germs.
A microfiber cloth is then placed over each of the AC vents and the blower is switched on to allow the foam with all the dirt to come out of the vents. The foam coming out is all cleaned up with the cloth and its job done! Clean and fresh air with zero bad odour when you switch on the car AC after this procedure is carried out.
This is largely a DIY procedure but always helps to have a technician carry out the service in case the cabin filter needs replacement or if there is an issue with the AC blower motor or refrigerant gas levels.