Oops. My bad. I found out since posting the above reply that the 2009 Core 2 Duo iMac can be upgraded to macOS Sierra or to High Sierra. All these years I assumed that because the App Store did not display an operating system more current than El Capitan it was because my hardware would not allow for it, but in this case I felt compelled to update this topic to clarify that it may be possible for a late 27" 2009 iMac to be updated after all (caveat being, even High Sierra is considered out of date too).
There is an Apple support document that explains how to create a bootable USB stick for the purpose of updating macOS, but it may be easier to go on the Big (A) Rainforest website and buy one pre-made (assuming you're okay with the risk associated with obtaining your macOS install source from a third party). More importantly, the aforementioned document contains links to older versions of macOS that the App Store will not let you view/download. (Apple doesn't make finding older macOS easy!)
Having now upgraded from El Capitan to High Sierra, I have run into serious upgrade-related problems with black screens and issues logging into iTunes and the App Store. If you're not prepared to troubleshoot installation issues — which are all too common, particularly on vintage hardware — buying a new(er) Mac with the current macOS (Ventura) is the better way to go.