Your 2017 21.5" iMac is/was the base model iMac in 2017 and was never designed to do much more than some basic web surfing and e-mail. It was not designed for professional applications such as MS Office or any Adobe apps. Its primary "block" is the glacially slow 5400 RPM hard drive, other than the HD it's not a horrible computer however remember it is also 7 years old and is simply showing its age. Doing an erase and install will not do anything to improve it.
If performance is what you are after you have a couple of options, option 1 is replace the computer with a more up-to-date model that has an SSD instead of a traditional HD. This is a good option as your current machine is very close to being deemed obsolete meaning it will not run current versions of Mac OS and parts are difficult to obtain. If you do this you can get another iMac or even a Mac mini, MacBook Air or MacBook Pro, any of these would be dramatically quicker than your 2017. You can also select an Apple Refurbished Mac from Apple's Refurbished store.
Option 2 is to take your 5400 RPM HD out of the equation by installing an external SSD which is not too difficult at all. Going this route will get a few more. years out of your 2017. An external SSD installation is done by following the steps in How to setup an external SSD as your startup disk. Instead of using the drive that is recommended in the link, I'd recommend the OWC Envoy Pro SX.
So you do have options, which one you decide on is of course totally up to you.