Unpleasant odors can be caused by wet fabrics if they are left in the appliance for a longer period of time.
Frequent use of the tumble dryer will ventilate the appliance properly and the smell will disappear by itself after a while.
In the case of condenser dryers, you must also clean the heat exchanger and the filters as described in the operating instructions.
For a quick remedy, spray a cloth with perfume or a similar fragrance and add it to the laundry during the drying cycle.