🛑 Big red flag here.
This statement, not an OS update, may be at the core of your issue:
My iMac is a 2017 model and a reboot takes about 20 minutes,
Even with a mechanical hard drive, your boot time should be far faster. Such slow booting is a sure indication of a serious issue with your storage, likely a failing drive. Mechanical drives and Apple's Fusion Drive will both take a long time to boot if they are problematic. These drive types used in iMacs are the source of many iMac issues we handle here.
If you want a data-driven evaluation in this setting where we can neither see nor touch your computer, please post an EtreCheck report. We can quickly and within the limitations of these forums help you determine what issues are at play without our playing a protracted game of "20 Questions" with you that could go on for days.
EtreCheck Pro is available here:
https://etrecheck.com/index
The free version will do nicely for this purpose, although the app is worthy of our financial support.
We can see hard data about drive performance, software issues and interferences, and RAM usage. Etrecheck is the development of a long-serving and trusted ASC contributor. It is a reporting app, not a "fix-it” app, expressly for displaying information in these forums to help us help you remotely. It will not reveal any personal or secure information.
Please see this excellent user tip on how to post long text reports like EtreCheck's into a forum response:
How to use the Add Text Feature When Post… - Apple Community