When you open the Arduino IDE, select Tools > Board, you will find that the Arduino IDE only has Arduino AVR Boards and no esp32.
So we need to install the ESP32 board in the Arduino IDE. Follow these steps:
1.Open File >Preferences
2.Add the development board management address URL.
3.Copy the URL in the lower box and add it to the “Additional Boards Manager URLs”.
http://arduino.esp8266.com/stable/package_esp8266com_index.json https://www.arduino.me/package_esp32_index.json
4. After adding the URL, click “OK”.
5.Click Tools > Board > Boards Manager.
6.Search for “ESP32” in the BOARDS MANAGER’s search bar and install it.
7.If the following screen appears, please wait until the installation is complete then turn off the Arduino IDE.
8.Open the Arduino IDE again and select Tools > Board. You will see the esp32 board appear.