You go to an on-line account you use all the time, and instead of just logging you it, it asks for your password.
If you're thinking clearly, you might remember it. If you're suffering a bout of brain fog, you're probably stuck.
Some people get around the problem by using the same password for everything. The problem with that is it's not very secure. If someone gets hold of your password, they can get into all your accounts everywhere.
Here's another option, one that I learned from my tech-savvy son.
When you have to create a new password: think of a phrase, or a song or book title that you are going to remember.
For those of us with brain fog, I'd add to think of something that has a relationship, at least in your mind, with the thing the password is for. The link will help spark your memory.
So, say you need a new password for your Google accounts.
The word "Google" might make you think of a googley-eyed monster.
Take your phrase and remove any punctuation or spaces, so now you have googleyeyedmonster.
Good passwords have a capital letter or two in them. So now capitalise the first letter of each word and you have: GoogleyEyedMonster.
Good passwords also have a number or two in them. An easy way to do this is to replace some of the letters with numbers that look like the letters. Let's change each lower case "e" to "3". Now we have Googl3yEy3dMonst3r.
Because the phrase is related to what you're using the password for, you are more likely to remember it, and it's quite a secure password because it's long, contains a combination of numbers and lower and uppercase letters, and is quite difficult for someone else to guess.
If you have an Instagram account, you might decide it's a File0fPh0t0s. You might think all the drama your friends share on Facebook is a bit like a Shakespearian play and have a password like AlasP00rY0rrik. Your bank account might make you think of an old ABBA song: Mon3yMon3yMon3y.
Of course, if you do all of that and still forget, write your passwords down. Do not write them on scraps of paper you leave lying around, or in a notebook you keep with your phone in your handbag (because when your handbag gets stolen the phone and the passwords are enough to get someone into all your accounts.) Write them down in a password saving app on your phone or other device. (You can get quite good apps that save passwords securely for free.) But make sure you remember the password or access number for the app.
And don't use Googl3yEy3dMonst3r as your Google and Gmail password. That one's taken. (Just kidding.)