Part of the Pacific Gas and Electric “upgrades” over the past few years is the bonus feature of sudden power loss lasting 1/4 or 1/2 second, which is plenty to shut down any computer or other gear I am using.
I have a variety of UPS units I’ve bought over the years, enough that they have “aged out” even after 2 or 3 batteries. These days, the 2019 iMac 5K draws so little power (even with 2nd display), that a simple unit is all I really need.
Today only, Amazon has the CyberPower CP1350AVRLCD Intelligent LCD UPS System, 1350VA/815W, 10 Outlets, AVR, Mini-Tower at only $99. I just about one since one of my similar APC units went bad (and it cost a lot more).