Howdy-ho, Digbert22 (or Cherie), whichever you like to be addressed as....
although a new iMac 24" is a decent machine...and the older iMac's pro were decent machines, too, the new iMacs are not upgradeable at all. they are built to custom order....so after you buy one, internal upgrading of any kind is impossible, you can, however, add external SSD's and dvd drives, etc...something to maybe think about...plus they run Catalina or greater, which is fine, but anything that runs/ran in High Sierra will not run in Catalina unless you find a 64-bit Catalina compliant version of the software/program/application....it breaks all 32-bit support, does away with it entirely....My vote (and this is what I have and am using now) is for a Classic(Intel??) Mac Pro 5,1 with 12 cores... still lots of life, power and goodness left in the old beastie, at least I think so... upgradeable easily ? you betcha...RAM and internal hard drives/SSD's ? Sure, no sweat, as big as you want and can afford, you can have up to 3-4 hard drives or SSD's in there...max capacity per drive ( I think ) might be 6-8 TB each... as for Ram/Memory, up to 96 GB, video/graphics card, a Sapphire Pulse RX-580 with 8 gigs VRAM would do you just fine... and it'll run Mojave like a champ...won't do Catalina or later officially, oh well...and it's relatively affordable for a used Classic Mac Pro 5,1 with 12 cores...OWC (macsales.com) used to sell them, and I'm sure there are other places out there that do sell Classic Mac Pro 5,1's with 12 cores, just not OWC at the moment. They do offer an Apple Mac Pro (Late 2019) at a starting price of $3,579 USD (that's US Dollars) and you'd have to figure out and add on the cost of shipping it to you, and taxes....as for what you can do with your old 21.5" mac....I'm guessing it's an iMac...Apple will recycle it for you, for free.....they, as you said, won't give you anything, and you won't get anything for it in terms of cash or value...you could donate it to a school , sell it locally "as-is" for parts/spares/repairs, eg , Kijiji or Facebook Marketplace...any local buying and selling groups....
Anyways, that's just my opinion, and I'm just one guy, I don't know how much you have to spend (your budget) or how much money you have set aside to maybe buy a newer Mac...how much you could spend safely, and/or how much you'd want to spend/could spend....I just checked online, and DVwarehouse.com has used Classic Mac Pro 5,1's 12 core starting at $700 USD ... https://www.dvwarehouse.com/apple/desktops/mac-pro.html
might be worth a look-see
John B
John B