i would guess that it would just be in large part to their immune systems being generally more robust and adapted to the environment to which they live.
they will not be exposed to as many toxins and other insults as most of us in the West ( many of which have been demonstrated to be disruptive to our endocrine systems for example)
indigenous people typically also live in harmony with their environment in sustainable ways - this means they tend to sleep when its dark and work when it light, have close knit social groups, and lead physically active lives, and are generally more contented (all of which have positive health impacts ) - not obsessed with year-on-year growth, keeping up with the next big thing or how many comments their pics on TikTok got,
they have also been living with these microbes for Millenia so there will have bee some natural selection towards greater immunity in that time.
the microbiome is itself closely tied to our immune system - most of which resides in the gut and is "trained" by what it finds there - but i would see it as a subset of the above - rather than the only or main factor