That iMac model can be OS upgraded to OS X 10.7.5 Lion and that is it!
You will need to install 4 GBs of RAM into that iMac.
With that model iMac, only a litle over 3 GBs of RAM will be recognized, but a Mac and OS run better together with two identical sized RAM pairs.
Also, you will need a more recent and secure web browser as these Apple Safari web browser versions are woefully out of date and unsecure.
Download and install.
Firefox 45.9 ESR .dmg install file here.
https://ftp.mozilla.org/pub/firefox/releases/45.9.0esr/mac/en-US/
You may need to update Adobe Flash Player to the last compatible version for Firefox 45.9
You need to use Adobe's Flash Player uninstaller, first, to uninstall the older Adobe Flash Player.
https://helpx.adobe.com/flash-player/kb/uninstall-flash-player-mac-os.html
On the Adobe Flash Player section of the Adobe website, you will need to look for the last Adobe Flash Player version compatible with Mozilla Firefox 45.9.
This is the Adobe Flash Player you are looking for on the Adobe web site.
Adobe Shockwave Flash version 26.0.0.137
Look toward the bottom half of this webpage link.
https://fpdownload.macromedia.com/pub/flashplayer/installers/archive/fp_26.0.0.1 31_archive.zip
Once downloaded on your Mac, dbl-click to open the zIp file
Dbl click to Install the Mac OS version if there is one listed in the archive file (might be a .dmg file).
Good Luck to You!