You need to clear the EEPROM of the device.
With an ESP8266 that’s easy - you just choose Erase Flash - All Flash Contents when you re-upload the sketch.
Unfortunately, that option is missing for the ESP32 in the Arduino IDE.
Suggesting the best solution is a little difficult, as you’ve not shared enough details about your hardware and what you’ve done with the Settings.h file.
Pete.