ESP32 with LED strip, only works when connected to PC USB

Like @gilshultz says, a schematic please

and your code