Connecting an ESP32 to a 5V voltage requires attention regarding current . While the ESP32 operates at 3.3V, inserting a 1k resistance can help you to securely interface with 5V outputs. This approach https://socialrator.com/story13478149/esp32-s3-projects-utilizing-a-1k-resistor-with-5v