It gets worse. The other issue is right here:
iMac (21.5-inch, 2017)
Status: Supported
iMac Model: iMac18,1
2.3 GHz Dual-Core Intel Core i5 (i5-7360U) CPU: 2-core
You have the crippled educational/institutional iMac made for bulk buyers looking for an attractive price. It has a low-performance. 2-core laptop-class processor.
The standard consumer 21.5-inch iMac 4K for 2017 that cost only US$200 more had a proper 4-core desktop-class processor. Even the slowest of the 4-core models ran 50 percent faster than yours for roughly an 18 percent increase in purchase cost.
These are benchmark scores from the MacTracker database. Yours is shown above the regular consumer version:

Still, setting up an external USB3 SSD drive as the new boot volume will drastically improve the feel and perceived speed of what you have now for, in most cases, around US$100.
It does not require professional installation or opening of a computer case that Apple did not design for user access to the innards.