The main adjustment your body goes through when you make major diet changes is the gut bacteria. Your gut bacteria feeds on what you eat and if you change what you eat the bacteria that used to get fed will die off. New bacteria will come in with your new foods and will start to populate your gut and eventually thrive. This can create some digestive issues during the transition.
Actual useful research about gut bacteria and how it important it can be for overall health is relatively new though some things are starting to be understood.
https://nutritionfacts.org/video/how-to-change-your-enterotype/