For your use, any Mac which supports macOS Catalina, has 8GB RAM and an SSD (internal and external) should be sufficient. Second hand iMacs are often quite cheap for what they offer.
If you want to buy a new 27-inch iMac, I would either:
a) get the base model, and add an 1TB external SSD (Samsung T5 or Samsung X5) and boot from this SSD.
b) get the base model but upgraded to 256 or 512 GB SSD, and then add the 1TB external SSD (Samsung T5). Boot from the internal SSD and use the external SSD for storage.
c) get the base model but upgraded to 1 TB SSD.
The RAM is easy to upgrade so you can do it once it is necessary — and it might never be necessary for you.
Definitely not worth it to upgrade the CPU. You won't notice the difference for the next few years, and once the more expensive CPU finally becomes a real benefit, the computer will already be outdated for other reasons.
I would only upgrade the CPU if:
a) you have heavy use, e.g. 4K video editing or gaming
b) if the difference is very big (e.g. i7 instead of i5, quad core instead of dual core,…) for little money
For example, if you would get the 21.5-inch iMac, the three models have very different processors and upgrading is definitively worth the money. For the 27-inch iMac: not so much.
Alternatively, have a look at the Geekbench scores, though benchmarks don't say everything of course:
https://browser.geekbench.com/mac-benchmarks