A tough one, depending on your initial iPhone and iCloud setup and what you have done since iOS 18 installation.
1) Backing up your current bad iOS 18 installation makes no sense whatsoever;
2) If you updated to iOS 18 OTA, you could also try to do a fresh iOS 18 Beta IPSW install, which might just fix things up for you. This could be less time-consuming than the step 3) below.
3) If your iPhone data (messages, photos, contacts, app settings, etc.) were automatically saved to iCloud in iOS 17, you might be able to get it all back when you revert to iOS 17, but you would need to setup your device as new and arrange everything to your liking manually. A hassle, but well worth it to make it work well.
Good luck! 🖐️