Very common cause of error. RAM ***''must''*** be matching pair or you are asking for trouble - timing issues, etc.
Try each of the RAM modules separately. Now it MAY work fine with both of them separately. In that case buy the twin of which ever one you can find. If not available purchase a new matching pair.
If that does not fix the problem try removing the NVMe SSD drive and just boot up into the BIOS.
The other thing is something is loose as you say ". . . sometimes it freezes at the slightest movement." Re-seat all components and cables slowly and gently.
Oh and Wagnard Tools has a diagnostic which checks
# Component Store against Windows Update Servers so must be online.
# Verifies and fixes any corruption in Windows against 1.) above.
You did mention corrupt files. Wagnard does a more thorough check than /sfc scan.
Let us know how it goes.