> *So my question is, what are these parts purpose?*

It looks pretty much like a reverse voltage protection circuit. In other words, if the incoming supply to VIN were incorrectly connected regards polarity, the MOSFET inside your red/orange box would turn off and prevent you circuit smoking.

[Here's a link to a site that explains how it works](https://components101.com/articles/design-guide-pmos-mosfet-for-reverse-voltage-polarity-protection#:~:text=PMOS%20MOSFET%20for%20Reverse%20Voltage%20Protection&text=FETs%20control%20the%20flow%20of,switch%20in%20reverse%20polarity%20protection.). It uses a slightly different gate bias circuit but, in essence, it does the same thing.