@wsa123
You may have just bought this, but this model came out 15 years ago -- so it's not really new. Being this old, there are lots of things that can be going wrong with it.
Bluescreen failures (i.e., BSODs) are notoriously difficult to diagnose and to fix -- far beyond what WE typically can do in this self-help Community.
You have a couple of different options to chose from ...
--------------------
The first is that of specialized forums where where folks have vast experience troubleshooting, diagnosing, and suggesting repairs for BSODs.
The community Win10 forums has a section devoted to diagnosing BSODs. So, your best bet would be to post your problem there: https://www.tenforums.com/bsod-crashes-debugging/
The community Win8 forums has a section devoted to diagnosing BSODs. So, your best bet would be to post your problem there: https://www.eightforums.com/forums/bsod-crashes-and-debugging.30/
The community Win7 forums has a section devoted to diagnosing BSODs. So, your best bet would be to post your problem there: https://www.sevenforums.com/bsod-help-support/
--------------------
The second is using free software to examine the logs that BSODs produce. This app is known as bluescreenview and is available from NirSoft, from here: https://www.nirsoft.net/utils/blue_screen_view.html
You will then have to go online to do searches with that information to get further suggestions about what to do.
Good Luck
I am a volunteer and I do not work for, nor represent, HP