Apple is no longer signing iOS 17, which means it can't be restored to anymore. But I have found a workaround!
Note: This only works on Windows as far as I know
Download the iOS 17.6 Beta 3 IPSW file from ipsw.dev, as it's still being signed by Apple (make sure it is for 17.6 Beta 3)
Make a backup in the Apple Devices app
Navigate to the folder C:\Users\YOUR NAME\Apple\MobileSync\Backup
In this directory, locate and open the Info.plist file using Notepad.
Once open, use Ctrl + F to search for the iOS version (e.g., 18.1 or 18.2). Then, change the version number to 17.6 and save the file
Perform a factory reset on your phone by navigating to Settings > General > Reset, then erase all content and settings. (BE SURE YOU MADE A BACKUP OF YOUR PHONE OR YOU WILL LOSE ALL DATA!!!)
Once reset plug your phone into your pc and put it in DFU mode. If you do not know how to do this, there are countless guides based on your device.
Once in DFU mode, shift restore in the Apple Devices app and select the iOS 17.6 beta 3 IPSW we downloaded earlier
It should go through the restore as normal...
Once the phone comes back on, you should get asked if you want to setup or restore from a backup in the Apple Devices app... Restore from your backup
Once the phone is done restoring (this could take a long time) go into settings and check for software updates. You should see iOS 18 but DO NOT click update on there. Instead scroll down and you should see iOS 17.7.2 to update to... Ta-da!
Now you can block it from nagging you to update to iOS 18 also by installing the block OTA profile from https://betaprofiles.dev/install/block-ota/
Note: This only works on Windows as far as I know
Download the iOS 17.6 Beta 3 IPSW file from ipsw.dev, as it's still being signed by Apple (make sure it is for 17.6 Beta 3)
Make a backup in the Apple Devices app
Navigate to the folder C:\Users\YOUR NAME\Apple\MobileSync\Backup
In this directory, locate and open the Info.plist file using Notepad.
Once open, use Ctrl + F to search for the iOS version (e.g., 18.1 or 18.2). Then, change the version number to 17.6 and save the file
Perform a factory reset on your phone by navigating to Settings > General > Reset, then erase all content and settings. (BE SURE YOU MADE A BACKUP OF YOUR PHONE OR YOU WILL LOSE ALL DATA!!!)
Once reset plug your phone into your pc and put it in DFU mode. If you do not know how to do this, there are countless guides based on your device.
Once in DFU mode, shift restore in the Apple Devices app and select the iOS 17.6 beta 3 IPSW we downloaded earlier
It should go through the restore as normal...
Once the phone comes back on, you should get asked if you want to setup or restore from a backup in the Apple Devices app... Restore from your backup
Once the phone is done restoring (this could take a long time) go into settings and check for software updates. You should see iOS 18 but DO NOT click update on there. Instead scroll down and you should see iOS 17.7.2 to update to... Ta-da!
Now you can block it from nagging you to update to iOS 18 also by installing the block OTA profile from https://betaprofiles.dev/install/block-ota/