Chosen Solution

The house electricity went off and on rapidly , after that, the laptop refused to open although the connection with electricity has no problems.

Pull the power from the laptop and remove the battery. Once you do that, hold the power button for 60 seconds-2 minutes. That usually clears up power issues. Refer to this guide to remove the battery. When you power the laptop back on, plug the adapter in first BEFORE installing the battery to ensure the laptop comes back on - if you install the battery first it may bring the issue back with these HPs. Hopefully it didn’t damage the motherboard, since a brownout like that can finish off a board with borderline failing components.