The hard drives in those iMacs may be worn out or failing, especially after sitting for years. The power supply may also be bad from age. If, however, the iMac works and the hard drive is healthy, then installing Linux Mint on it is a good way to keep the computer useful for some tasks. This would require learning a new OS, but it is a great way to keep older computers alive since Linux only needs about 4GB+ although I have been successful using Linux on an older Mac with just 2GB of RAM with several browser windows/tabs open. However, Linux is not for everyone. You can test drive Linux Mint by choosing the "Live" option from the USB installer although it will be extremely slow running from a USB stick, but it will give you an idea of what it looks like & to confirm it works. It can also give you a chance to check the health of the internal hard drive by using GSmartControl which may already be installed or it may be possible to "install" it into memory while running in "Live" mode from the USB stick.
Many popular third party browsers are supported (Firefox, Google Chrome, Vivaldi, etc.), plus it has access to LibreOffice as well as lots of free open source software including video editing apps although I don't know how they will perform on such an old system especially since the iMac probably does not have much memory. There are also some open source games available as well.
I mentioned Linux Mint specifically since I know it will install & run on older Macs and its desktop environment options don't use as much memory as some others. Other Linux distributions may work or can be made to work, but some of them utilize a desktop environment that is too resource intensive for older systems (Ubuntu's default is one of those needing a newer higher end system to run).
Before erasing the internal macOS boot drive, I highly recommend you create a bootable macOS 10.11 El Capitan USB installer while you can so you can always go back to macOS if you decide Linux is not for you on this iMac.
Create a bootable installer - Apple Support