i also had this problem.
you need a pc for this fix. ( i used Win11 )
1. download itunes on pc
2. sign to your Apple id
3. Logout from your Apple id on your device and disable on Setting > Apple Id > ,,Where is ?"
4. connect your Iphone to your pc
5. download on ipsw.me the downgrade for your device, it must be signed ! it should like look this 17.7✅
6. after the installation you should go back to Itunes
7. Look for ,,Restore Iphone"
8. Press Shift + Left click on it
9. select your ipsw file
10. after this all you can just downgrade your Device i hope i could help yall ✌🏼
-----------------------------------------------------------
if you have errors look on youtube how to downgrade from ios 18 to ios 17