When it happens again open the task manager (might take a while), go to performance and look at your SSD. Is it at 100% disk usage?
I had this problem a few times before and it's annoying as hell. One time it was a Windows Store hiccup where it started to update in the background. One time Windows update. One time Nvidia Broadcast got stuck installing. And a lot of times I tried to play Apex Legends and EAC (Easy AntiCheat) scanned my entire drive for a few minutes..
I've tried a ton of tweaks, but start with the following (use CMD as Admin):
sfc /scannow
→ Scans for errors, will probably find some and fix them. Run again till no errors come up
chkdsk /f /r C:
→ Full SSD scan for broken sectors. Will probably ask you to restart, the scan happens after restarting. This fixed a ton of issues with my Windows 11 installation, even though the SSD tests and SMART showed no issues
That's an awful take. Grab a password manager and have a random password for every single account of yours. That way all you have to do is remember a single strong password and that's it. Instead of playing Russian roulette when one service you use gets hacked and someone gets a hold of your username / email and one of your 3 different passwords..