I signed up with my utility and they send me text messages when power goes out and when it comes back on. It's a free service.
There is also this gizmo:
https://www.amazon.com/Power-Failure-Detector-Email-Alerts/dp/B09XJZ77BV
Most of these devices are more oriented toward detecting power on than power off.