OS X 10.10 Yosemite is no longer available for initial download from the Mac App Store.
A "local" Apple Store location maybe able to install Yosemite for you, but OS X Yosemite is just as resource intensive as El Capitán and may have a similar slowing down effect.
There might be programs on your Mac now that may need, and is using, the hidden Rosetta PowerPC emulator that is only part of OS X 10.6.8.
Once you upgrade OS X, that emulator is gone for good and those apps that relied on that Rosetta PowerPC emulator will no longer function and you would need to upgrade those apps.
Depending on the version of Adobe apps you use, the maximum OS X version your 2007 Mac maybe only able to run use either OS X 10.8.5 Moutain Lion OR OS X 10.9.5 Mavericks.
I use Adobe CS4 Design Premium and that CS suite only works up to OS X 10.9.5 Mavericks with some of the Adobe Bridge and some CS4 support apps that no longer function.
OS X 10.9 Mavericks is, also, no longer available for initial download, from the Mac App Store, either.
You would need to call and. check a local Apple Store location to see if they could install thst version of OS X onto your iMac, too!
I am actually, now, more regularly running OS X 10.8.5 Mountain Lion and ALL of Adobe CS4 runs fine on OS X10.8.5.
Here's a website for to check app compatibility with newer OS X versions.
http://roaringapps.com/
In any event, if you decide at some point to upgrade your Mac's OS X, you need to backup all of your Mac's data, first before attempting anything.
Another thing, if you want to improve your 2007 iMacs performance slightly, your year iMac can take a maximum of 6GBs of RAM.
You replace one of the 2 GBs RAM modules with a 4 GBs RAM module only found here online.
https://eshop.macsales.com/item/Other%20World%20Computing/5300DDR2S4GB/
Good Luck!