Tutorial: Debouncing buttons and switches on the ESP32 http://www.switchdoc.com/2018/04/esp32-tutorial-debouncing-a-button-press-using-interrupts/

Tutorial: Debouncing buttons and switches on the ESP32

Or you could just add a cap and resistor …

@Steve_Spence Absolutely! There are many ways to do this.

@Steve_Spence i prefer software solution, as it is easier to tweak