You really shouldn't be cutting up budgets for parts when looking at builds/upgrades.
Ideally we need an overall price you're willing to spend, + whatever components you currently have which can carry over need to be listed to give us an idea.
What is the overall budget and what parts do you currently own, or have access to? If you already have some half decent DDR4 sat around then what Tetras suggested is a good shout, if you need the RAM you're between a rock and a hard place but are probably still better off going the same route. If you've segmented the budget for the RAM separately to the motherboard/cpu then you're probably best off with the AM5/7600, if it helps I've seen the 7600 for as little as £170 lately.
Personally, I would go AM5 either way even if it requires you to spend a little more.