UPS is OK for brown outs and some spikes, and allows you to shutdown PC "normally" when power goes out
Not sure it would be what to get for generator power, as you have to replace the batteries in those every few years(3 to 5 years), which gets expensive if you are looking at long term use
You can get Line Conditioners, its like an electrical filter, similar to UPS but without the battery
Generators with inverters usually have "clean" power, so you can just get lower wattage Conditioner for just one outlet/ appliance that concerns you
Surge suppressors
Electricity travels close to the speed of light
I think the fastest reaction time for a surge suppressor is 9 nanoseconds, which is very fast but.................................
electricity will travel about 25ft in 9 nanoseconds
Most devices have a 6ft cord....................lol
Better surge suppressors will be a bit larger because they will have 25ft of wire coiled up inside
Just FYI