Before you make any move to upgrade this Mac, be sure that you back up your data.
The 2019 iMac is capable of running the newer macOS versions just fine, including macOS 15 Sequoia, the latest that is available for that hardware. Imho, the goal for this Mac should be to bring it all the way up to macOS 15 Sequoia. This will get you the longest productive life for that hardware before age and obsolescence force you to replace it.
However, it will be helpful to troubleshoot the cause of the performance slowdown you have now before you try to upgrade.
You have options, and what you do will depend partly on what built-in storage that Mac has.
If the startup drive is a slow 5400 RPM HDD, then the performance bottleneck is the drive itself coupled with the APFS drive format required since Catalina. It's a common issue. The fix for this is either replacement of the internal HDD with an SSD, or installing macOS on an external SSD and booting and running the Mac off that.
If your startup drive is a Fusion Drive, your performance issue may be related to a fixable failure there. Perhaps a failure of either the HDD or SSD hardware portion of the drive or maybe the software fusion has been split. Failed hardware can be replaced. A split of the software fusion can be fixed, but the drive must be wiped.
How to fix a split Fusion Drive - Apple Support
In either case, replacing the internal drive(s) requires opening the computer. It's DIY-able if you have some skill and can follow an upgrade guide, but best left to a qualified service tech.
To troubleshoot your current slowdown and provide the best guidance, I recommend that you run an EtreCheck report on your Mac. EtreCheck is a safe and highly regarded utility from a trusted developer and respected ASC contributor.
Please navigate to EtreCheck.com to download the utility and when you install it be sure to Allow Full Disk Access. Once you’ve run the app and created your report please post that with your reply to this message using the “Additional text” button at the bottom of the message window. The generated report will not include any personal info. It simply gathers specifics about hardware performance and installed software that might be in conflict with the OS.
Please note you must upload the full report. To see how, please click > How to use Add Text when posting… EtreCheck Report.
We’ll use your EtreCheck report to look for clues to what may be causing your problem and advise how to correct it before you decide how best to upgrade your Mac.