Very bad guess!
This is a big problem with the Arduino project information.
The only too real real danger here is that the obsolete tutorials on the Arduino site and others misleadingly imply that the largely ornamental "barrel jack" and "Vin" connections to the on-board regulator allow a usable source of 5 V power. This is absolutely not the case. It is essentially only for demonstration use of the bare board back in the very beginning of the Arduino project when "9V" transformer-rectifier-capacitor power packs were common and this was a practical way to power a lone Arduino board for initial demonstration purposes. And even then it was limited because an unloaded 9 V transformer-rectifier-capacitor supply would generally provide over 12 V which the regulator could barely handle.
This is because the on-board regulator is essentially capable of powering only the microcontroller itself and no more than a couple of indicator LEDs. The on-board regulator might be able to power a few other things if it had a heatsink, but on the (older) Arduinos, it does not.
Powering via the "barrel jack" or "Vin" connections is asking for trouble. The "5V" pin is not by any means an output pin, if anything a "reference" pin but most certainly the preferred pin to which to supply a regulated 5 V.
So you can simply forget the on-board regulator and "Vin" and when you have a nice regulated supply of 5 V - generally from a switchmode "buck" regulator as you have - you want to convey it to where it is actually required - the "5V" pin and your other modules.
The problem specifically with the UNO and Mega 2560 is that if the PC is connected to the USB port while you are powering it through the "5V" pin, it may feed a slightly higher voltage to the PC's USB system and cause it to shut down, so you need to disconnect the "5V" pin while connected to USB.