Thank you for your replies. I tried keeping the side panel off, and the crashing stopped. I think some of the cables from my PSU got stuck in the CPU cooler.
It still wipes the drive whenever I turn it on though. It keeps some apps, f.x. Steam is still installed but discord isn't, but seems to wipe all settings, including saves passwords.
Before I buy a new drive I want to try and reset Windows completely, to see if it fixes the problem. The problem is that I can't open up my settings.
Do you know how to get around that?
Thanks again.