PC freeze can caused by many problems:
On the basis of that fact, as for what causes a computer to freeze or hang, they are mainly:
1. Full Disk usage on Windows 10.
2. Memory issues.
3. Corrupted files.
4. Outdated or incompatible drivers.
5. Recently installed third-party software.
6. Problematic Power settings.
7. Overheating.
8. System error.
There is full computer freeze solutions here, and it can solved all the freeze conditions:
https://windows10skill.com/pc-freezes-slow-on-windows-10/
This can help you fix it with:
Fix Disk Drive Problems Causing your PC to Freeze or Slow
Fix Memory issues leading to PC freezing
Fix Problematic Software leading to freezing PC
Fix Problematic Power settings giving rise to PC freeze
Fix Overheating Triggering PC Freezing on Windows 10