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.
Repeat their name a few times. Intentionally use it in sentences.
Also just accept the awkwardness and ask people their names later. No one cares. It’s fine.