Make sure your Mac has the latest version of macOS or the latest version of iTunes.
If you don't have an older backup that was made using the current version of iOS, you might not be able to restore your device with your most recent backup. Note that backups created while using beta software might not be compatible with older versions of iOS. Then-if you have an archived backup-you can set up your device again from that backup. To remove the developer beta immediately, you need to erase and restore your device.