First of all, forget Ryzen. With your budget no way are you building a Ryzen system. And forget prebuilt, for $500 you aren't getting much in the way of a prebuilt PC. Maybe an office machine that you can do emails and surf the web on, but it won't be able to play games.
For a gaming system that you can buy with your budget you should look for used parts, and especially since you have parts you want to keep from your old machine it makes sense to go custom, go used, and get the maximum bang for your buck.
The most important things are the case and PSU, these are the bedrock of your system. Once you have those you can upgrade slowly over time. Your PSU is actually pretty decent so you should keep that, but I'll bet your case is not big enough and out of date at this point.
I'd recommend something "Mid-Tower" sized, used, and with lots of space inside for working on your machine.
Something like this:
https://www.ebay.com/itm/324696265279 - $50
Now cases are tricky because they are big, bulky items so the shipping can often be more than the case if you're buying used. You might have better luck at a yard sale or thrift store than on eBay for the case, sometimes you can find them dirt cheap. For everything else, 100% eBay is the way to go.
You should keep your existing SSD and HDD to keep costs down and maximise your bang for buck.
Which leaves us needing to find:
- Motherboard
- CPU
- CPU Cooler
- RAM
- GPU
So for Motherboard + CPU you will be best off buying a "bundle" on eBay. I would probably target the 3.3Ghz i5-6600 CPU as it still gives great performance in games without being too expensive, and is still relatively recent.
For example:
https://www.ebay.com/itm/265201852876 - $130
For RAM, the board I linked above takes DDR4 which is pretty cheap used so you can get to 16GB quite easily on your budget, which is ideal for games etc:
https://www.ebay.com/itm/324698014736 - $60
With only $285 left in the budget after buying a case, motherboard, CPU and RAM, I'm afraid to say the GPU you can afford is going to be a few generations old and relatively weak.
Not sure if you are aware, but GPU prices, even on used GPUs, are through the roof right now due to global chip shortages. So the max you can probably afford on GPU for under $295 is probably a GTX 980:
https://www.ebay.com/itm/194222656210 - $250
Finally, get a brand new CPU cooler. This is not something you want to buy used really. Just something basic like an Arctic Freezer from Newegg or wherever:
https://www.newegg.com/arctic-cooling-freezer-34-esports-acfre00057a/p/N82E16835186231 - $35
So:
- Mid Tower Computer Case - approx. $50
- i5-6600 Motherboard and CPU bundle - $130
- 16GB DDR4 RAM - $60
- GTX 980 - $250
- Arctic Freezer - $35
Total cost $525, plus around $35 for shipping puts you right on track for your $500 budget, but only AFTER you sell your existing Motherboard, CPU and RAM on eBay. You might not get much for them, only $10-20 per item, but this will at least keep you under budget.
You might also be able to find these parts cheaper than the listings I showed you. If you go for Auctions instead of Buy it Now, and try to snipe bids to get a good price, you can probably save 50 bucks or so. You might even be able to keep your existing case, but probably not if its a Dell or HP or whatever.
With an I5-6600 3.3Ghz CPU, 16GB RAM and a GTX980 GPU you can expect decent performance in most games, although you won't be cranking up Cyberpunk 2077 to ULTRA, it will still be a decent system capable of playing most games on Medium or High at 1080p.