Change Apple ID password or info on device
account, some of your personal information cannot be changed on the web. To change your password, use one of your Apple devices that is signed in with this account in the Settings app.
account, some of your personal information cannot be changed on the web. To change your password, use one of your Apple devices that is signed in with this account in the Settings app.
If you must do it on the web the article Change your Apple Account password - Apple Support
has a short section on doing it that way.
Change Apple ID password or info on device