Plug goes into the wall
Device you want to control goes into the outlet on this device
USB charger is connect to power from the wall, that powers the ESP32
Relay controls the outlet
Can be controlled using MQTT, HTTP, or the green switch
Could you done with and ESP01 - look into this