ESP8266 doesn’t connect to WiFi when powered by power supply

Get a better power supply.

For items like the ESP32-CAM, I solder 2 super caps in series across the 5V line.