Does the laptop turn off suddenly with its lights off as well? or do the lights remain on and only the screen blacks out?
Also, do you know if any updates were recently installed or interrupted during an update?
Meanwhile, here's what you need to do:
If Windows suddenly shuts down without warning, it might be caused by one of several issues.
A BIOS update can also resolve the issue: click here for steps.
Follow the steps in this section, in order, to run a hardware test to identify any issues with the device:
Install the latest version of the HP Hardware diagnostics (UEFI) on your device using this link: Click here for details
Hold the power button for at least five seconds to turn off the computer.
Turn on the computer and immediately press Esc repeatedly, about once every second. When the menu appears, press the F2 key.
On the HP PC Hardware Diagnostics (UEFI) main menu, click System Tests.
Click Extensive Test.
Click Run once, or Loop until error.
While the test is running, the time remaining and test result for each component display on the screen.
If a component fails a test, write down the failure ID (24-digit code) for when you respond back to us.
Keep us posted,
If you would like to thank us for our efforts to help you,
Give us a virtual high-five by clicking the 'Thumbs Up' icon below, followed by clicking on the "Accept as solution" on this post,
Have a great day!
Riddle_Decipher I am an HP Employee
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".