The pc was working fine for like 8 months now didn't change anything suddenly this happened i did reset the bios to default and disabled secure boot and tried to boot from bootable flash drive after unpluging all other drives and still freezes, replaced the motherborad, tried work with only 1 ram, all of these solutions didn't work
Just curious though, which OS did you try to boot from flash drive? Windows or Linux/Ubuntu? Because if it was Linux/Ubuntu, we can be sure that it is some hardware that is failing that is causing the system freeze because the system is trying to check the status of all the connected device and because the system doesn't receive the active signals back, it is stuck in a loop. If this is the case, then it is no longer a software problem but a hardware one. The best bet would be to strip all the and try booting each time after connecting the drives one by one.
Btw, i am actually intrigued that you were able to replace the motherboard.
Another problem i can see is, our words are not exactly interpreted as they have said. We say one thing and you do another, i can rule this out as miscommunicate error but that is all we have on hands. We don't have anything to support you besides words and if miscommunication occurs then there is no point in helping since that may do you more harm than good.
f you managed to install Windows, why can't you also boot from a USB? how did you install windows in the 1st place?
For instance, mr. Cyler has asked how you were able to boot and install in the first place but there are no reply for that. To give you suggestions, we need real time data, all data possible.
To help you more, please share images next time. For instance, images of power on, bios interruption screen (Esc F1 or F9 or F12), The screen of where you select the boot device. Anything is fine as long as you provide us with as much as data as possible.