Start with where the smell appears
If only workout wear smells, retained sweat and body oils may be the main problem. If an entire load smells musty, consider whether wet laundry sat too long, whether the washer itself has odor or whether the load was too crowded to wash and rinse effectively.
More detergent is not automatically better
Both poor cleaning and detergent residue can contribute to unpleasant results. Follow the detergent label for load size, soil and washer type rather than adding an arbitrary extra amount.
Drying matters
Move wet laundry promptly and dry it completely within the care-label limits. Storing damp fabric can allow musty odors to return.
Check the washer
If odor affects many loads, inspect and clean the machine according to its manufacturer instructions. Pay attention to the drum, gasket and dispensers where applicable.
Garment care labels, appliance manuals and laundry-product directions can be more specific than a general guide. Use them when they set a tighter limit.