This is the oft-discussed 8 GB / HDD configuration.
A fast HDD will do ~150 to ~200 I/O operations per second.
A slow SSD will do ~100,000 I/O operations per second.
You don't have a fast HDD, here.
And that 8 GB isn't enough for even moderate usage, particularly while also trying to mask the slowness of that HDD with memory cache. You're accessing that hard disk for everything; with minimal or no room for memory cache available for HDD storage contents.
That iMac config was built for low selling price and for very light usage, and not for performance. More recently, macOS and/or apps and/or your usage have outgrown it.
The least bad option for improving performance—and it'll improve performance substantially over that HDD—is an external SSD via Thunderbolt or USB 3. See the link I posted earlier.
This is very slow, but about what would be expected for a slow HDD, and it and the lack of memory are the performance limit:
File system: 34.09 seconds
Write speed: 86 MB/s
Read speed: 89 MB/s
Surprised at how much baggage HP seemingly loads for a low-end printer in a low-end system, too. But that's a different discussion.
As mentioned in another reply, you do want and need backups via Time Machine or otherwise, too. Without backups, computers are one fire or failure or spilled-beverage or flood or drop away from data loss...
If you replace... An iMac 24" will be massively faster, and I'd go for 16 GB minimally and as much internal storage as you think you'll need over the life of the iMac 24", as neither can be upgraded.