The way to remember it is to immediately use it after they say it, either just repeating it, or using it in the next sentence. And then use it again when you say goodbye to them.
There’s no guarantee it’ll stick, but it’s much more likely than just trying to remember it.
In my experience, it’s literally impossible to recall someone’s name after you ask them what their name is.
That’s science, of some sort…
The way to remember it is to immediately use it after they say it, either just repeating it, or using it in the next sentence. And then use it again when you say goodbye to them.
There’s no guarantee it’ll stick, but it’s much more likely than just trying to remember it.