the 21" would be fine - although the 512 video will be a problem in the long run. Need 27" to get better options - 2gb or 4gb.
Personally, I cannot imagine NOT working on the 27" though and recommend it instead. The 27 has easy user installable memory, so cheaper to up the memory via macsales.com, crucial, etc. I added 16 GB to our late 2013 27" imac to give it 24 GB total.
Refurbished is essentially new at a good discount - and still eligble for AppleCare:
http://store.apple.com/us/browse/home/specialdeals/mac
inventory chnges daily. Took me a week or two before the loaded iMac I wanted appeared.
One of the forum moderators
AC 27 USA and earlier • macOS Ventura 13.6.9, MacBook Pro M2 Max 12CPU/30GPU cores, 32GB