Try this
You can safely preserve your photos via iCloud as long as they are already visible on the iCloud website, because this encrypted passcode request only protects specific end-to-end encrypted data (like Keychain or Health data) and will not delete your cloud photo library.
Tap "Forgot Passcode?" or "Cannot Approve?": Look on the screen for options such as Forgot Passcode?, Don't Know Passcode?, or Cannot Approve this iPhone?.
Skip or Reset Encrypted Data: When you select one of these options, iOS will give you the choice to skip restoring those specific encrypted settings or to reset end-to-end encrypted data.
Accessing Your Photos: Choosing to reset or skip this step will not delete your photos if they are already fully synced to iCloud. Once your new iPhone finishes setting up, just ensure iCloud Photos is turned on in your settings, and your photos will download to your new device.
Alternative Verification: Check if any other Apple device you currently own (like an iPad or Mac) is receiving a prompt to approve your new iPhone.