STEP 1: When you update the iOS, skip "approve the phone" by pushing the button of Cancel. You can retry it later.
STEP 2: Complete the iOS update by following the instruction.
STEP 3: Make sure that your Two-Factor Authentication is ON at this moment by either of the following options: Option A) Read a notification email from Apple. Option B) On your iPhone, go to [Settings] --> [iCloud] --> tap your profile of Apple ID --> Password & Security --> Two-Factor Authentication
STEP 4: Turn OFF the Two-Factor Authentication. During this process, you will be required to reset your Apple ID (iTunes & iCloud) password. But no worries, no date will be deleted. If you received the notification email about the Authentication, you will find a link of "turning off the Authentication" in the email.
STEP 5: After completing the Authentication OFF, retry "approve the phone" by going to [Settings] --> the red flag. Without doing anything, your iPhone will be automatically and immediately approved. All set.
You can get the Two-Factor Authentication back ON anytime later if you wish.
Hope this helps.