If your iPhone is locked and you need to reset your Apple ID password, you can do so easily using iforgot apple com website (
https://iforgotapplewebsite.com/). First, visit the website on a computer or another device. Enter your Apple ID email address and follow the on-screen prompts. You may need to verify your identity using your email or security questions. If you’ve enabled two-factor authentication, you’ll receive a verification code on a trusted device. Once confirmed, create a new password. After resetting, you can unlock your iPhone by entering the new Apple ID password. Make sure to update your credentials on all connected devices.