I have an unusual name so when I meet new people my brain focuses on their reaction to my name and how they pronounce it, so I completely zone out when they tell me their name. I might remember it for a short time but almost always I forgot their name if I don’t interact with them frequently.
Sometimes I make puns with the name and create a mental picture of the person with those pictures. For instance, if I get introduced to Spencer, I imagine the person in a top hat and monocle fanning himself with a wad of cash (spend-sir). If it’s a woman named Jackie, I imagine her in martial arts uniform performing a kick.
If I’m not feeling too imaginative, I write a note in my notes app about them so that I can refer to it later on.