Here my shutdown solution: the rpi is listening on gpio 3 for starting/stopping. If you have a pushbutton connect with gpio3 and Ground, you can Start the RPI.
To enable the shutdown, you have to add a dtoverlay=gpio-shutdown in the config.txt
That works only if you dont use the gpio for Ic2.
But you can use another gpio for shutdown.
As you see at the picture I use the gpio25 (another red cable), therefor the command in config.txt must be
dtoverlay=gpio-shutdown,gpio_pin=25,active_low=1,gpio_pull=up
then you can start and shutdown the rpi with the pushbutton. After the shutdown you can discaoonect from mains.
To enable the shutdown, you have to add a dtoverlay=gpio-shutdown in the config.txt
That works only if you dont use the gpio for Ic2.
But you can use another gpio for shutdown.
As you see at the picture I use the gpio25 (another red cable), therefor the command in config.txt must be
dtoverlay=gpio-shutdown,gpio_pin=25,active_low=1,gpio_pull=up
then you can start and shutdown the rpi with the pushbutton. After the shutdown you can discaoonect from mains.