You can do that, however first NEVER EVER buy a computer from anyone but an authorized reseller, including Ebay or any other non authorized source, doing so is almost a certain guarantee of trouble. If you want a used one buy from Apple's Refurbished store or www.macsales.com. Apple's refurbished are the best as they have the same warranty as a new one, are eligible for AppleCare (very smart to get), are identical to a new one, can save hundreds of $$$. In short they have no down side, the caveat is finding one you want in stock. The things to avoid (and when I mean avoid I mean like avoiding Covid-19) are:
21.5" models with 8GB of RAM and any HD including a Fusion drive.
27" models with any HD or Fusion drive.
In short only buy a Mac with a SSD. The 21.5" models do not have upgradeable RAM so buy one with a minimum of 16GB and the largest SSD you can afford. If you want a 27" any SSD model is fine, buy with 8GB of RAM and then buy upgraded RAM from either Crucial.com or Macsales.com. I just checked an Macsales.com has a nice configuration, a 2015 27" with 16GB of RAM and a 1TB SSD for $1629.
By the way, new 27" iMacs with a SSD start at $1799 not $2000 and if you have okay credit you can get interest free financing from Barclay Bank (link is in the online Apple Store) for 18 months.
Good luck.