To prevent mold growth in your home make sure to keep your home well ventilated when possible and dry out any wet areas immediately to discourage mold growth.
During the summer months be sure to run your air conditioner even a little bit while you're gone to keep the humidity out of your home.
An air conditioner does more than just cool down a home it also helps to remove moisture and humidity in the air which can cause mold.
When you remove that moisture and humidity it helps to stop mold growth.
Another good idea is to use a dehumidifier too to stop mold growth as well as an air purifier.
If there's already mold growth in your house such as on rugs or drywall or on some wooden studs get rid of that wood, rugs or drywall or anything else with mold growth and replace them.
When installing drywall in your bathroom use a mold resistant drywall for bathroom use and direct anyway water away from your home.