You have to set the RTS signal (on the USB serial adapter) to 0 to allow the ESP32 to execute the code you uploaded. Otherwise it will just not run due to the way it’s wired up in hardware. See Serial monitor always prints null (macOS) - #3 by wildernessfamily.