You did not do anything wrong, when you change your password, it can take some time for the password change to be reflected on your devices, Windows does not check your password online for every login, if you wait a while, the change in password will be reflected on that device.
You can also use the process provided on this link to force a log out on all devices you use your Microsoft account on, this will also take a small while to be reflected on the devices, you will then need to log into any device you use your Microsoft account to log into.