HP model? What are you doing at the time of freeze? This happen randomly or just when you game, perhaps? Did this happen recently, after you installed something?
What are your temperatures? Get and use HWMonitor, post a screenshot.
If you open task manager, is there a program that uses a large amount of CPU or RAM?
You might want to run malwarebytes, too. (the free version)