Hello A6910ANTIOMONU,
Welcome to Apple Support Communities!
We want to help get the code working so you can verify your iPhone and proceed.
Try restarting the iPhone and then try again to accept the code with these steps:
"Use the code displayed on your trusted device
If you have a trusted device running iOS 9 and later, OS X El Capitan and later, iPadOS 13 and later, or watchOS 6 and later, the verification code is displayed automatically on your trusted devices.
- Sign in with your Apple ID and password on a new device or browser.
- Look for a sign in notification on any of your trusted devices.
- Tap Allow to receive your verification code.
- Enter the verification code on your other device to complete sign in."
This Apple Support page has the full details: Get a verification code and sign in with two-factor authentication - Apple Support
This should help resolve the issue so you can get the code to sign in verify your iPhone.
Cheers!