Please edit your opening post, select all code and click the <CODE/> button; next save the post. This will apply code tags which makes it easier to read, easier to copy and thye forum software will display it correctly.
That is what you should look at first.
Are you using some random ESP32 or an Arduino Nano ESP32?