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.
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.
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 126.96.36.199
Look toward the bottom half of this webpage link.
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!