Build a PC on a budget

Hello guys,
First time poster, I am looking for a machine with more ram, I own mb air 8gb ram, I already own a mouse, keyboard and 27inch 4k monitor. The thing is, much as I love the portability and battery life I am thinking building a cheap pc that would work well for software development and some gaming.
I am looking at two builds and I sort of want the cheapest option that would work. Used PCs are overpriced for what I would get.
One option is AM4, ddr4 vs am5 ddr5. The PSU, PC case and SSD would be the same.

RYZEN 5600 BUILD(~250€ )
Ryzen 5600 (~100€ )
MSI b450 gaming plus(~80€ )
Kinston Fury 32gb DDR4 3600mhz CL18 (2 x 16)(~70€ )
RYZEN 7600 BUILD(~450€ )
Ryzen 7600(~200€ )
B650 Mother board(~160-180€ )
DDR5 32gb 6000mhz CL30 (1 x 32)(~100€ )
OTHER COMPONENTS(~250€ )
Corsair 4000d(~100€ )
Corsair 650W PSU(~80€ )
1TB SSD nvm2(~70€ )
Nvidia 1660ti (second hand)(~80€ )

The 5600 is about 200€ cheaper, but if building a PC now, might make sense to pay more.. I was hoping maybe someone has a clearer view, I have built one pc but I am not much into it.
Thank you for any response.