We can be more effective helpers in the setting where we can't see nor touch your computer if you post details of your iMac—there are hundreds of variants.
"About this Mac..." from yourApple menu will show the important sub-model. Please include the screen size, year, and any modifiers to the year like Early, Mid, or Late.
While in "About this Mac..." please click the "Storage" tab and tell us what the frist entry show of rdrive type:

The options usually show as SATA drive, Fusion drive, or Flash storage.
Most "slow" complaints about iMacs come from people with 2012-2019 21.5-inch models who did not upgrade their storage to either Fusion or Flash at the time of order. The base hard drive in those is a slow 2.5-inch laptop-class drive that seems to slow more with each change in macOS.
This simple test can indicate if the HDD is your bottleneck:
- Is the computer slow to boot up? You have answered that already.
- Are big apps slow to launch?
- Once launched, do those big apps see to operate at normal speed?
Three YES answers point the drive. If you have a slow mechanical drive, there are cost-effective options that don't involve a new computer.
PS: Adding RAM as some might advise will NOT help if you have the slow mech drive problem.