OP:
What kind of DRIVE is inside?
If it's a platter-based hard drive, it's going to be slow.
If it's a fusion drive, it may be slowing down, as well.
Some folks open up the iMac and change the internal drive, but this is not a job for the squeamish. It involves some risk in that it's quite easy to break something in the process.
Having said that, you can give the iMac a fairly nice speed boost by upgrading to an EXTERNAL USB3 SSD -- making it your EXTERNAL boot drive.
This is so simple I call it "child's play on the Mac".
What I'd suggest:
Get a Samsung t7 "shield" drive, either 512gb or 1tb (the 1tb seems to be on sale for a good price):
Samsung T7 Shield Portable SSD delivers high performance on-the-go, not matter the terrain. It has an IP65 rating for water1 and dust2 resistance, with Dynamic Thermal Guard to manage heat control. Transfer huge files instantly. USB 3.2 Gen 2 and PCIe® NVMe achieve soaring sequential read/write ...
www.amazon.com
Download SuperDuper from this link:
SuperDuper is FREE to use for this purpose.
Connect the SSD to the iMac.
Open Disk Utility
Go to the "view" menu and choose "show ALL devices" (VERY important, DO NOT SKIP THIS)
Erase the SSD to APFS, GUID partition format.
Open SuperDuper. You can accept all the SD "defaults".
Put the internal drive as the "source".
Put the SSD as the "target".
Let SuperDuper "clone" the contents of the internal drive to the external.
Finally,
Go to the startup disk preference pane.
Click the lock and enter your password.
Now click the icon for the SSD.
REBOOT.
That's it -- iMac should now boot and run from the SSD.
Will be considerably faster !
PRINT OUT this reply for future reference.
Having written all this...
If you don't want to upgrade the old iMac, then it might be time to start shopping for a replacement.
I'd suggest an m2 Mini, or perhaps even an m2pro Mini...