Moving from one OS to a newer OS is called an upgrade.
A 2010 iMac can upgrade to Mac OS X El Capitan or macOS High Sierra.
For Mac OS X El Capitan 10.11.6 or macOS High Sierra 10.13.6,
if you upgrade to Mac OS X El Capitan you will still have problems accessing
various websites, Certificates for older versions of internet browser expired
on the 30th September 2021.
Open Safari and click on this link,
How to get old versions of macOS – Apple Support
Go to the Download OS section and click on the OS you want to install.
Before upgrading make a full back up of your Mac.
Check that third party apps you use have updates available for the new OS.
https://roaringapps.com
Check that your printers/ scanners etc have updated drivers and software available for the new OS.
Connect your mac to your router via cable rather than rely on WiFi.
Do not use your mac while it is downloading
and do not use any other devices that share the same internet connection.
If the App Store says ‘Open’ then it is detecting a previous download of the install app
go to the Applications folder locate Install macOS High Sierra.app.
Move it to the Trash, empty the Trash.
Restart, click on the link again, the App Store should say ‘Get' or 'Download'.