That laptop has the graphics in the CPU, so I would look at heat issues. Open it up and blow it out if you can.
If it's clean, try running Test Mem 5 from the link at: MemTestHelper/DDR4 OC Guide.md at master · integralfx/MemTestHelper · GitHub
It's a .rar and a quick, easy way to see if your RAM is messing up while in Windows. You can also run OCCT: OCBASE/OCCT : Free, all-in-one stability test, stress test and monitoring tool for your PC
That will test the entire machine. Usually this issue is heat from dust build up, but bad RAM can do it, a defective battery or power supply, possibly the screen inverter. Try to keep it simple and work to the complex.
If you spilled anything on it, well might be game over.
"It worked before you broke it!"