Open settings -> Tap on iCloud -> Password and Security -> Tap on Generate verification code and enter the verification code on your iPhone and your issue of iPhone verification failed issue will be resolved.