The 2017 iMac is compatible with the macOS up to 13 Ventura, but not 14 Sonoma.
❗️Do NOT upgrade
…until you have made a Time Machine or other backup of your startup drive.
Learn How to Back up your Mac with Time Machine
The macOS version you can upgrade to depends on the year your Mac was released
Click the Apple menu () at the top of your screen and choose About This Mac.
✅ Check the compatibility of your Mac hardware with newer versions of macOS software:
➡️ macOS 13 Ventura is compatible with the Macs listed here (c.2017)
➡️ macOS 14 Sonoma is compatible with the Macs listed here (c.2018)
If your Mac is compatible with the OS upgrade, then this:
Update macOS on Mac - Apple Support
Alternative Method–
➡️ Download the macOS upgrade installer app:
Click > macOS 10.14 Mojave, macOS 10.15 Catalina, macOS 11 Big Sur, macOS 12 Monterey or macOS 13 Ventura.
Once downloaded, double-click the “Install macOS…” app now found in the Applications folder to begin the upgrade.
Please see > How to download macOS - Apple Support.
❗️– IMPORTANT –
None of your old 32-bit apps will work in macOS Catalina or newer, including MS Office, Adobe Photoshop and many other older apps and drivers. This will require that you find 64-bit updates and/or replacement titles.
32-bit app compatibility with macOS High Sierra 10.13.4 and later - Apple Support
Use the free utility Go64 to check the 64-bit compatibility of your currently installed apps:
https://www.stclairsoft.com/Go64/