A whole-food plant-based diet is clearly, rhe best. Animal-based foods have zero fiber, and refined foods (sugar, flour, fruit juice, etc.) are generally made by removing fiber. Highly-processed (or ultra-processed) foods also generally lack fiber but do include questionable additives.
This article explains how to nourish your gut microbiome. (no paywall)