This is how to change the sign-in password on a Mac.
Steps
Open Apple menu › System Settings › Users & Groups.
Click Info (i) next to your user and choose Change Password. On older macOS versions, click Change Password directly.
Enter your old password, then your new password twice.
Optionally enter a hint. It appears in the login window after several wrong attempts.
Confirm with Change Password.
Note: If the Mac then asks for the keychain password, enter your old password. Support resets forgotten passwords.