I work sometimes at a research installation that is vulnerable to lightning strikes, including the potential for direct hits. Our lightning shutdown procedure includes turning off all the important devices, turning off the UPS they are plugged into (this is the size of a small file cabinet, not the UPS a normal person buys for a home computer), and unplugging the UPS from the wall.
We leave the "housekeeping" stuff on (lights, coffeemaker, telephone, wifi router), on the basis that we can afford to replace those and it would be annoying to shut them down every time we had the potential for lightning.
Donald is correct that a surge protector cannot stop a close lightning strike. Surge protectors are more for defense against a surge that might happen if there is a fault on the power line, like a neighborhood blackout and recovery. A close strike can jump all sorts of paths that ordinarily wouldn't be conductive. It can in principle even fry unplugged devices, but this is uncommon.