Hi,
You can return to the iOS 17.5 stable version from the iOS 18 beta without losing your data.
Since you already backed up your data, you don't need to worry about it.
1. Enter Recovery Mode on your iPhone
You need to connect your iPhone to your Mac.
Go to Finder on your Mac > Select iPhone from the left navigation > Now, Enter Recovery Mode on your iPhone by pressing the volume up and volume down buttons and holding the Power button.
Now, open Finder > Tap on the Restore button when it appears > Again, click the Restore and Update button when it appears from the prompt. You will see an instruction there. Follow the on-screen instructions and wait for some time to complete the process.
Let me know if this helps. I am also happy to answer any questions you have.