Searches on eBay for iMac spares and iMac repair and it is possible to bag a real bargain. Avoid Buy It Now and stick to Auctions and preferably those with a low start. The very least you should expect the Logic Board to be included in the package (the more the better) as it saves the cost of purchasing additional spares.
Intel (Aluminium) iMacs from 2009 - 2011 are the best to look out for. From 2012 - present they are not so accessible due to the revised slimline profile. Avoid the 2008 model as they are prone to Graphics issues. Far too many times have I had to remove and re ball the Graphics Card for customers from 2008 machines. iFixit offer excellent easy to follow tutorials for repairing and replacing components on Macshttps://www.ifixit.com/Device/Mac
The older Intel Core Duo White iMacs are pretty good but are restricted to OS X 10.6 Snow Leopard. To run more recent OS X (macOS) releases you need an iMac with an Intel Core 2 Duo chip. Models with Intel (Sandy Bridge) i3 and i5 chips are also available but with these the cost is generally higher.
Used Macs with an Intel Core 2 Duo chip or higher can be made in to powerful and productive machines.
Never Buy New.