I already have experience with this like I accidentally click the save password and at that time
If this happens, the easy way to do this is to change your password, but it would be better if you never save passwords on the browser.
We actually no need to change passwords, we can clean the cookies to get them erased from the saved password or you can go to the settings of the browser and clear it by yourself. But this is a very old trick, now there are many ways to find passwords you are using when you connected to public networks like free wifi.
Correct, many people knows that but still a good thing to see that posted here since for sure many people still not aware especially if they are in rush to go. But aside from that trick the simplest thing we can do for that is to click that x and shutdown the computer so that it will reset.
And for security better we should not log in our important accounts on public computers.