Visit the Apple () menu > About This Mac. On that panel look at what is within the parenthesis on the product description line for your iMac. Compare that to the Mac hardware that can upgrade to Monterey:
macOS Monterey is compatible with these computers - Apple Support
If your iMac is not on that list, then compare it to:
macOS Big Sur is compatible with these computers - Apple Support
If your iMac cannot upgrade to either operating system, then you are stuck at Catalina. Otherwise you can get the compatible version of macOS at How to download macOS - Apple Support. I recommend using the Safari browser, and the downloaded installer will deposit in your /Applications folder.
Before you upgrade beyond Catalina, back up your iMac one last time on Catalina, and save (do not reuse) that Time Machine drive on the newly upgraded operating system. Verify that your third-party applications and printer/scanners are supported on the upgraded operating system beforehand.