The microbiota is passed from mother to son on birth, not totally from the environment.
What we currently don’t understand is why for some people they never got them (we have techniques to transport the biota from the mother during birth for non-natural procedures) or they loose them.
Even with the transplant, the microbes won’t stick around on those people (not taking about autistic people here, but people in general).
Diverse food really helps, just as not eating ultraprocessed (they won’t reach the end of the intestines).
Fermented and other pre or probiotics will really help too.
But none of those will recover the biota in some people.
In some countries the number of kids born through c-section are very high, more than half the kids in Brazil are born that way for example, so definitely people can be healthy without getting it from their mothers.