The ESP32 is an MCU (no LEDs!), so you need to specify what ESP32 board you are using. That defines the LED pin. Look at its datasheet.
If you are using a ESP32 DEVKIT V1 board, then the LED pin in GPIO02: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/