Greetings!
Thinking that this behavior can occur because you have Fusion Drive. Not bad storage, but newer macOS rely on SSD.
Fusion Drive is a storage solution that was introduced by Apple in 2012 for select iMac and Mac mini models. It combines a traditional hard drive (HDD) with a solid-state drive (SSD) to create a single logical volume that appears as a single drive to the user.
The idea behind Fusion Drive is to take advantage of the high capacity and lower cost of traditional hard drives, while still delivering the fast read and write speeds of solid-state drives. The system automatically manages which files and applications are stored on the SSD or HDD based on how frequently they are used. The most frequently accessed files are stored on the SSD for fast access, while less frequently used files are stored on the HDD.
Fusion Drive is a transparent solution, meaning the user does not need to manage where files are stored, the operating system and the storage system work together to provide the best performance and storage capacity balance. However, Fusion Drive is not as fast as a pure solid-state drive (SSD) or as high capacity as a pure hard drive (HDD), it is a balance between both types of drives.
It is important to note that Fusion Drive is only available on select iMac and Mac mini models, and it is not user-upgradable, meaning that it is factory installed and cannot be added later.
To replace the Fusion Drive with an SSD on a 27-inch iMac 2017 contact or visit an Apple Authorized Service Provider or an Apple Store. However, the process may vary depending on the model and the country you are in. It's best to contact Apple support or an authorized service provider to check if it's possible and to get an estimate of the cost.
Keep in mind that replacing the Fusion Drive with an SSD will typically result in faster performance but may reduce storage capacity, depending on the size of the SSD you choose. Additionally, if the iMac is still under warranty, opening the device or attempting to replace the drive yourself may void the warranty. Therefore, it's always best to have an authorized service provider perform the upgrade.
Just to cover the situation if replacement is not an option:
Downgrading macOS probably would help, but you'd face with lack of support, many apps won't install or will have not the newest version + potential security risks, depending on your surrounding.
[Link Edited by Moderator]