There are a lot of different studies and my comment was pretty short, but this is an explanation and evaluation of the generally used system for classifying food into ultra high processed versus not.
https://www.nature.com/articles/s41430-022-01099-1
Most studies involving human diet involve self reporting so that's why its important to understand the limitations of that classification system.
There have been lots of studies showing a connection with microbiome changes, though some countries have been later than the USA in adopting more ultra high processed foods, allowing a more timely study, here is one about Spanish citizens and tried to guide the self reporting diet a bit more specifically about where to categorize their food intake.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC8398738/