If your Apple ID was locked, you can go to iForgot to unlock it with your existing password or reset your password. You can also click the Reset Password or Forgot Password button in the alert. Remember to type your full email address when you're asked to enter your Apple ID. For example, username@icloud.com or username@gmail.com. If you use two-step verification for Apple ID, you need to use your recovery key and a trusted device to regain access to your account.