Newer GMC trucks have often had issues when connected to an RV.. There are many post out there regarding the issue... Usually truck problem.
Your truck is brand new so the 7 way connector should not be that corroded.
Truck Side Checks:
.. as stated visually check all 7 pins on truck side for any issue
.. use multimeter and measure the DC voltage out of the 7 way receptacle on the truck with a helper pressing the brake pedal
RV SIde :
YOUR YEAR Montana uses a GIGGY BOX and this is where the 7 way RV wires are connected ( each to a threaded terminal with nut ) .. check for any loose connections in the giggy box
Keystone video on Giggy box and inside the box on the lid is a schematic with wire code for the RV to truck 7 way cable
https://www.keystonerv.com/innovations/giggy-box