The first question relates to whether the HDD was formatted as HFS+ or APFS. I can't remember what the original OS was. I think it's a 2017 iMac and this is the picture on the outside of then original box. I'm pretty sure it is post High Sierra, so Mojave.
Go up to the Apple menu.
Choose About This Mac. There it should tell you exactly which Mac model you have and the version of the Mac OS.
Choose System Report in the same window.
Under "Hardware" choose "Storage". Under "File System" it will tell you if your Mac is HFS+ or APFS.
Under "Media Type" it will tell you if you have a "rotational" hard drive, or an SSD.
If you are running Mojave or later, your internal drive will almost certainly be APFS.
It has been suggested to me that erasing an SSD is not as effective as erasing a HDD. Is that true?
Yes. But that's kind of moot since you report that you have an internal rotating disk hard drive. APFS is optimized for SSD's. APFS is far from optimal for rotating disk hard drives, while HFS+ was. APFS will cause a performance hit for operations that involve accessing your drive, such as opening applications (as you have found).
The Slowdown Soutions Web page includes links to sites that talk about the slowdown that APFS causes with rotating disk hard drives. It is very real, and as you have found, incredibly annoying that your previously nicely performing Mac has been hamstrung by an OS upgrade.
Also on the Slowdown Solutions Web page there are links with instructions on how to get your drive back to HFS+. It isn't dead easy to do so. In fact, most folks don't bother trying to do so. Most either install an internal SSD or just buy a new Mac. But if you don't have money to throw at the situation, the option to revert to HFS+ is there.
Mike Bombich has kindly helped me to set up an external SanDisk Extreme 1TB SSD to use instead of the internal HDD.
I don't mean to be a downer, but you may not want to rely on that drive heavily:
SanDisk Portable SSDs Are Failing So Frequently, We Can No Longer Recommend Them
https://www.reddit.com/r/editors/comments/10syawa/a_warning_about_sandisk_extreme_pro_ssds/
https://petapixel.com/2023/08/08/sa...o-frequently-we-can-no-longer-recommend-them/