Why is my Pc freezing randomly?

I have a not very modern pc, i will just say the specifications : i5 10400F, Rx 580 2048SP 8Gb and 1T ssd.

So it doesnt matter when it freezes but it mostly does when I play games even roblox, everything just stops working the monitor freezes up aswell, no bluescreen nothing.

Sometimes there is a loud weird continous noise in my headphones and there is nothing i can do but restart the whole pc by the button, any help? Sorry for bad english

crwdns2934089:0crwdne2934089:0 crwdns2934093:0crwdne2934093:0

crwdns2934109:0crwdne2934109:0

crwdns2889612:0crwdne2889612:0 0

crwdns2947414:01crwdne2947414:0:

8GB is a bit lean for gaming. I would get to 16GB to see if that solved it. Next I would look at your SSD usage, is the drive very full, try purging the temp files the system creates there are a few tools that will do this easily and quickly. But make sure you have a backup of your Apps and data before you do any file cleaning just to be safe.

crwdns2934271:0crwdnd2934271:0crwdne2934271:0

crwdns2934285:0crwdne2934285:0