it doesn't sound like anything abnormal to just completely forget a new password, let alone one part of it. I would not see anything to worry about in this instance. but if you're worried about your memory more generally, how is your sleep? do you get enough, is it restful, do you snore, is your schedule consistent, do you eat before bed? there can also be lots of other common factors like unresolved emotional trauma or depression or neurodivergent traits. additionally, memory is a skill that can be trained if you want to have a good memory.
again, this incident is not something to worry about. if you feel like there's a pattern, there are many things you can look into but start with your day-to-day state. investigate how your body and mind feel. I can't even begin to get close to saying you may have a particular condition, just want to give some lines of thought you can investigate if you want.