I respectfully a dissenting opinion regarding your drive's health. I have a little database of collected drive performance scores by drive type.
For your drive specs:
disk0 - APPLE HDD HTS541010A9E632 1.00 TB (Mechanical - 5400 RPM)
Internal SATA 3 Gigabit Serial ATA
these speeds:
Performance:
System Load: 1.69 (1 min ago) 1.72 (5 min ago) 1.76 (15 min ago)
Nominal I/O usage: 0.02 MB/s
File system: 43.66 seconds
Write speed: 80 MB/s
Read speed: 73 MB/s
are at the maximum possible for that drive model, but still dreadfully slow with newer macOS versions. Apple used very under-spec 2.5-inch laptop-class drives in un-optioned 21.5-inch iMacs between 2012 and 2019. Your drive was incapable of running faster even when new.
The possible drive health indication I see is in File System. In data collected, I am used to seeing healthy drives at 35 seconds or less but, at 43 seconds, yours is a bit high yet is not really screaming as sick. Like your doctor saying "We'll watch that" when your cholesterol is just a little over. Usually physical health issues in use start to show up when File System score are around the 75 second mark; the test times out at 120 seconds. 120 seconds would be Death's Door. ⚰️
The larger issue is that this is the crippled educational/institutional model made for bulk buyers with limited computing needs.
In addition to less powerful graphics, the big performance drop is due to the processor. Yours has a 2-core laptop-class 2.3gHz processor; the standard consumer model in 2017, the iMac 4K 21.5-inch (US$200 more), had a desktop-class 4-core process running at 3.0gHz.
Benchmark scores for the two 2017 iMacs tell a lot, (from the MacTracker database in the Mac App Store). Your is the one on top:

PS: Adding RAM will not speed up your hard drive. It would be a waste of money.
I absolutely agree with my wise amphibious friend that the external SSD boot drive is the most cost-effective way to get a very noticeable speed boost. My drive performance database shows the cheapest external SSD boot option will give 400MB/sec Reads and Write speeds— 5-6X faster than what you now get. That will elevate your experience with this Mac to surpising levels.
It is cost-effective because the external SSD can still serve as external storage on your next computer. That's high retained value.