Unplug the power lines of your home appliances from the outlet. Also, unplug the communication lines connected to your phone and computer, and the antenna lines of your TV.
However, when lightning strikes, it is not easy to unplug all these wires. It is recommended to install a lightning arrester (hirai-ki) in advance to prevent damage from lightning.
A lightning arrester can be installed in front of the equipment you want to protect.
Just plug it into an outlet like an extension cord to protect against lightning.
A lightning arrester can be installed in a distribution board. (Qualification as an electrician is required.)
There are also lightning arresters for telephone lines and communication lines.