Your diet supplies nutrients that support or oppose the presence of particular microorganisms. Fibre (also known as roughage), the edible parts of plants that are resistant to digestion, is definitely important for promoting ‘good’ microorganisms, but sugars, fats, and proteins have all been shown to impact the microbiome in various, not always positive, ways. Sugar, or fructose, for example, prevents Bacteroides thetaiotaomicron from increasing in number in the gut. This can cause issues because Bacteroides thetaiotaomicron ferments fibre from fruits, vegetables and beans, all of which keep the gut healthy. Too much protein can lead to the overgrowth of bacteria because protein is rich in nitrogen which encourages the growth of bacteria. 
 Townsend GE, Han WW, Schwalm ND, Raghavan V, Barry NA, Goodman AL, et al. Dietary sugar silences a colonization factor in a mammalian gut symbiont. Proc Natl Acad Sci USA. 2019;116(1):233–8. https://doi.org/10.1073/pnas.1813780115.