Tech
These are my 3 must-have Raspberry Pi accessories
Get this, add a few 18650 rechargeable lithium-ion batteries and you have a UPS (Uninterruptible Power Supply) for your Raspberry Pi.
Now, when the power goes out, the battery will work and keep your Raspberry Pi running until you can figure out the cause. Once power is restored, the battery will be recharged, ready for the next power outage.
This works on Raspberry Pi 4 Model B, 3B+ and 3B. If you want something similar for the Raspberry Pi Zero, then a MOTHER like this is a good choice.