Check the memory first by removing all RAM except one stick. If that solves the problem, remove that RAM stick from the socket it is in to the next one, restart the computer and see if the problem occurs, if not remove the RAM stick and place it in each remaining slot and check to see if the problem occurs.
If no problem occurs the RAM slots are good, do the same with each stick of RAM, you are now looking for a bad stick or RAM, but check it in every slot.
If your problem persists, no matter what you did with the RAM the problem is most likely not the RAM, the socket or controller, place a good stick of RAM back in the slot it was originally in.
PC freezing is a serious issue. If the power supply is causing your problem it can destroy components in your computer, including your CPU and video card. The Corsair CX series power supplies are minimal performing and are the type used by OEMs. Go to www.jonnyguru.com and search for the exact power supply you have to see if there is a write up. You can also do a general search listing your power supply and at the end add jonnyguru.com
How old is your power supply?
Make sure you do not have a virus. And, download and run Spybot Anti-Beacon, that will turn off most trash Windows 10 puts on your computer.
Underclock your CPU, underclock your video card, remove all RAM except 1 stick, remove the power cable and data cables from a DVD drive, all drives except the boot drive, remove power and data cables to everything you do not need. That will reduce the load on the power supply. If this helps, you need a new and better power supply.
If you can get another power supply it could be used to check your system. This is the best way to see if the power supply is defective. If you cannot get another power supply to check, take your computer to a repair shop and ask them to check your computer with a better power supply. If they want too much money to do that or want to fully diagnose your computer, which could easily cost $200. Try another computer shop and see if you could purchase a power supply and ask if it does not work in your computer can you return it and get your money back [you may have to pay a small return fee].
Some power supplies that you can consider purchasing [I suggest you stay away from Rosewill and Corsair CX, the Corsair TX is good]:
https://www.newegg.com/Product/ProductList.aspx?Submit=ENE&IsNodeId=1&N=100007657%20600479295%204814%20600014073%20600014075%20600014076%20600014077%20600014072%204026