Can you boot up into Windows in Safe Mode?
If you can, then is possibly a software driver that is crashing or conflict as it get activated when Windows starts.
Did you update any drivers just before all this started or installed any new software?
When you boot up are there any Trouble LED lit on the motherboard or maybe Error codes? Do you hear more than a short beep when you boot up (if PC speaker connected)?
I would run MEMTEST86 with all RAM installed to eliminate bad Memory module.
What is the Make & Model of your PSU? Do you have a separate GPU Card installed besides the Ryzen Integrated Graphics?
It could be a Windows Update that is causing the problem. Disconnect the computer from the Internet and see if you can uninstall the last Windows Update after the problem appeared.
Are your SSD in the Motherboard's QVL List as well as the RAM Modules?
Did you make any changes to your Motherboard's BIOS before the problem occurred. Try and reset your BIOS to "Default" or "Optimum Settings" and see if Windows starts without freezing.
Since you mentioned your computer setup was working fine without any problems that is why I mentioned everything above. It is possible you made some changes in Windows environment (Driver or Software or Update ) or BIOS that may be causing the freezes or it could just be a hardware failing or going bad.
A good start is to try and start Windows in Safe Mode. That would eliminate all 3rd party drivers and just activate the minimum amount of drivers Windows needs to run with.
As mentioned above, if Windows starts up normally without freezing in Safe mode. Then it most likely a driver or software or maybe even Windows Update causing the problem.
If it is Hardware, you should have the freezes no matter what you do since it is a physical rather than software problem.
I found out from another forum that if you do a clean install of Windows and still have BSODs or freezes or crashes that it indicates a hardware issue since a Clean Windows installation shouldn't have any 3rd party drivers or software installed yet.
as you can read in my post I've tried to do a clean install of windows on a different hard disk so it's not a software problem.
it's not a ram problem because I tried to remove the 2 Ram modules one by one but nothing solved.
I have a MSI 1060 6gb VGA and 700W gold corsair PSU
In my opinion it's 60% MB problem, 30% processor, 5% PSU and 5% VGA but I have no way to test which one is the cause for sure
Before doing all these test, I would suggest you reset your Motherboard's BIOS back to "Default" or "Optimum Settings" to prevent any settings that could be causing your problem.
the best way to test RAM Memory is by using MEMTEST86 (MemTest86 - Official Site of the x86 Memory Testing Tool ) installed on a Flash drive or CD/DVD disc and booting up to the software. It should run without any errors for 2 or more passes.
To check the PSU, CPU, and GPU I would suggest using OCCT (Download )which is free diagnostic to test those three hardware components. I suggest OCCT only because it is the only free diagnostic software that tests the PSU.
You can use PRIME95 or AIDA64 also to test your CPU and GPU.
You can test your SSD by using Seatools in DOS (SeaTools for DOS tutorial | Seagate Support ) the same way you test RAM Memory using MEMTEST86.
I had done all these test and I've told you that I've tried with a different SSD and removed the ram one by one.
Anyway today I found out that it was a problem of the CPU.
I replaces all the parts of my computer and it worked with a 1600x.
It's the first broken CPU of my life.