You've learned that your 21" iMac has reached the end of the line as far as upgrading the system.
It the iMac is doing what you want it to do currently you don't need to think about upgrading or a new Mac.
However, if it won't do what you need and that will require a new Mac consider the following: a 12‑core CPU, 12‑core GPU Dual 16‑core Neural Engine Mac Mini M6 with 16 GB RAM and 1 TB SSD ($1399 US) with a 32" LG 4k monitor ($331 US) from Amazon.com) is $1716 which is $450 less than a similarly configured new 24" M4 iMac ($2199 US). Keep your keyboard and mouse from your current Mac for use with the Mini. If you recycle don't include the mouse an keyboard.
I got the previous Mini M4 with a 32" LG 4K monitor w/speakers for the same price as a 27" monitor (didn't know the Mini had a speaker). There are many monitors available in 27" size for about $100 US to $500 US depending on what features you want. I love the extra screen real estate of the 32" monitor.
I had an 2017 i7 iMac with an SSD boot drive and a new M4 Mini runs circles around it. The new M6 will be even faster.
You can use the keyboard and mouse from your current iMac. Don't include them with the iMac if you use Apple Trade In or recycle with the iMac.
Just some food for thought.
