The support provided by the individual at your Apple Store was correct in that your iMac is obsolete. What they meant is Apple no longer can service it because parts are no longer available, in addition it cannot run current versions of Mac OS. Perhaps the tech did not explain that to you. This is likely why they suggested a new Mac. What is likely wrong with your computer is either a failed HD or a failed main logic board. The HD could be replaced but why spend hundreds of dollars on it?
You may want to consider buying a Mac mini and a 27" display, for about $1200 you can have a up-to-date computer and new display that FAR outperforms your 2014 iMac when it was running it's best! If $ is critical then consider an Apple Refurbished Mac. Apple Refurbs have zero downside as they are:
- Identical to new.
- Have the same 1 year warranty as new.
- Are eligible for AppleCare extended coverage.
- Can save hundreds of dollars.
If you are unfamiliar with Apple's refurbished program navigate to Apple.com and scroll to the bottom of the page and click the Refurbished store and then begin looking.
Bottom line is you have options, you can have your old obsolete computer looked at and spend money on it or you can use that money and replace it with a much more up-to-date machine.