It really depends how heavily you use your iMac. If you've been getting by on a 2007 model with a Core 2 Duo all this time, I wouldn't advise that you should spend the extra money on an i9 iMac unless you're looking to seriously expand/increase your workload.
Looking at i5/i7s for 27" iMacs from 2019 or 2020, here are your options -
2019
3.0GHz i5 (6 core)
3.1GHz i5 (6 core)
3.7GHz i5 (6 core)
2020
3.1GHz i5 (6 core)
3.3GHz i5 (6 core)
3.8GHz i7 (8 core)
As for the clock speed (GHz) on the i5 chips, it really doesn't matter because we're talking about really small differences (100-300MHz), so go for the cheapest i5 of these if the i7 is too expensive.
The i7 iMac is going to be the most expensive (except for the i9), so get it if you can justify the money for the extra performance. It's also better to get the i7 so it can take advantage of 32GB of RAM.
The memory (RAM) is user upgradeable, so you can get one with less than 32GB, then buy some RAM , upgrade it yourself and sell the RAM installed originally to make some money back.