Many pests only become problems because of our human actions. Unknowingly, human beings tend to provide a livable environment for wildlife mainly by providing access to food and shelter.
An easy way to prevent such pest issues is to make sure that there is no access to a food source or a livable environment. Ex. Locking outdoor garbage bins, not leaving any food in the open, repairing house construction problems as soon as possible because some species thrive on moisture and humidity, and most importantly seeking professional help at the right time.