ESP32 works powered by USB but reboots from power supply

Check that your external PSU can provide efficient current.