I just went from a 9600k to a 14600k and DDR5. Tbh, everything is cheaper (other than GPU’s) compared to the 9th gen era. 32gb of good DDR5 for around $100 bucks, $100-150 for a good MOBO or $250 for a reasonably high end Z790, and around $320 for 14600k. It just doesn’t make sense to spend any money on anything less than 13th or 14th imo.
If you need to buy a MOBO either way, definetly go for DDR5. If you already have a DDR4 MOBO that is compatible with your CPU, you need to decide if the extra performance gain is worth the cost. 13th gen sees an appreciable performance gain from DDR5, along with keeping your system more up to date.