Change your password
Go to account.microsoft.com and if you're not already signed in, sign in with the username and current password for the account you want to update.
From the navigation header, select Security and because you're accessing sensitive info, you'll need to enter the password for this account again.
From the Password security tile, select Change my password.
On the Change your password page, enter your current password and then enter your new password.
For additional security, select the optional checkbox which prompts you to update your password every 72 days.
Select Save.
If you weren't able to change your password
If you couldn't change your password this way, see Reset your Microsoft account password.
You can also refer to https://support.microsoft.com/en-us/office/video-change-your-microsoft-365-for-business-password-df48c24e-d036-4d72-987f-b6197f618619
If the above response helps answer your question, remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution. Your contribution is highly appreciated.
hth
Marcin