See the article If you forgot your Apple ID password - Apple Support
Reset your Apple ID password on the web
If you don't have a trusted device, you can reset your password on the web — but the process might take a little longer.
When possible, the web process redirects you to a trusted device. If you'll have access to one of your trusted devices soon, it might be faster and easier to reset your password then.
Reset your password at iforgot.apple.com
You have to reset Apple ID password from a browser using the link , the Apple ID account credentials must be known to you .
Enter the Apple ID only , click on forgot Apple ID or password , click on next.
Reset options - choose how would you like to reset your password ( a )
Click on reset through mail and click on ok .
Then open your rescue mail with web browser ( server account ) , open mail > click on reset password > two fields will be shown .
( a ) new password …..
( b ) verify password ….
Enter the credentials , and click on reset password , the password is changed .
If you click on - answer security questions - click on the right arrow .
Date of birth , verify your date of birth to continue > fill up the credentials > click on next and same pop up window will appear .
New password ….
Verify password ….
Fill up the credentials and click on reset password , the password is changed .