It would be too long if I had to explain it in this comment column, maybe you can read or see it here: randomnerdtutorials.com/installing-the-esp32-board-in-arduino-ide-windows-instructions/
Answer: I am still using Arduino IDE version 1.8 (old version) because there are some parts of Arduino IDE version 2 (latest version) that I don't like.