Turn arduino on and off with switch

@facuaaa Is this the same question as https://forum.arduino.cc/t/on-off-switch/919597 ?