Emily Barron, a cleaning expert at Property Rescue says that regular cleaning and drying of the inside of the cabinet can prevent moisture buildup. Wipe the inside of the cabinet with a clean, dry cloth after use and prevent mold from growing.
You also need to ensure that the bathroom is adequately ventilated to allow for air circulation. You can open windows, use extractor fans, or install one of the best dehumidifiers. This will also help get rid of bathroom ceiling mold and black mold on walls or windowsills.