The best way to prevent mold or bud rot on your cannabis plant is to understand the conditions that allow mold to thrive:
High humidity
Mild temperatures
Poor ventilation
Dense foliage
Dense buds
Weak immune systems in plants