Get help from someone you trust if you forget your password. To review your recovery contact, go to Settings - your name - Password & Security -
Account Recovery.
Using a recovery key can help you restore all of your data. When you create one, the only way to reset your password is by using another device already signed in with your Apple ID or by entering your recovery key.
Account Recovery
iCloud secures your data by storing it in an encrypted format. If you forget your password or device passcode, iCloud Data Recovery Service can help you get your data back. For your privacy, there is some information the service can't recover. To make sure you can get all of your data back, add someone you trust as a recovery contact or set up a recovery key.