What do you mean by "it restored" your "older version"? Older version of what?
With regard to the approval code, is it referring to iCloud Keychain or two-factor authentication?
If the device is frozen, you can try quitting apps that are currently opened, or consider performing a hard or soft restart.