so many things need to test out.
but i have been experimenting this issues..apparently it only happen when using displayport.
when i change to hdmi, no flickering or whatsoever whenever the house electricity on or off
but when change to dp, it started..sometime it flicker till the wording become blur and end up the pc stuck.
By right, outside interference should not affect your PC. The only explanation is it has something to do with your power supply.
For understanding why only on DP will it happen, it is actually quite simple.
DP allows the monitor to refresh at 144Hz therefore, both your monitor and your GPU needs more power to output those extra frames.
HDMI on the other hand is limited to only 60Hz.
You can try to experiment by using DP and lowering your Refresh Rate on your Nvidia settings to 60Hz and see what happens.
Another thing you can do is put your PC on Power Saving mode to not use so much power and see how it goes also.
At the same time, how are your PC and monitor plugs connected to the power socket? If you are not using a 3-pin power extender plug, chances are, the power surge might not be able to ground itself and therefore cause a power surge on your PC.
But at the same time, it could be an intermittent lack of power to your PC that caused the entire system to fail because there was no power to a hardware component when you turn on/off any lights at home?
I have a ceiling fan with an LED light in the middle. Usually at night, when someone turns on/off any lights, I can see the LED light up a intermittently though it was dim. That is why I suspect there is high chance that you are experiencing a surge.
If in power saving mode on your PC and your screen refreshing at 60Hz on your DP connection and you do not encounter this problem when you turn the lights on and off, I'd adhere to their advice on buying a surge protection plug or surge protection extender.