Your hard disk is quite possibly failing.
What you’re reporting about getting slower is one of the ways how a failing hard disk can fail.
Get a backup.
Get a backup, like, yesterday.
Don’t try repairs or verifications or other heavy-I/O activities.
Not until you have that complete, current backup.
If your HDD is not actually failing—which is certainly possible here—and the Mac has some cruft installed, well, now you have a good, current backup.
As for the replacement, probably SSD. Not HDD. HDD devices are cheaper and larger, but (far!) slower.
As for SSD size, at least the capacity of your HDD, and probably larger. How much larger is subjective, and based on your plans for this Mac.
As was mentioned above, I’d avoid the bottom end iMac and the Fusion drive if you replace this iMac with a newer one; the 8 GB / Fusion config is.... slow. That iMac is good for FaceTime and email and Messages, but a number of postings from folks here have found it... slow.