Similar to quietly reading outloud a 2FA code, or phone number, or set of navigation instructions, as we had to do back before smart phones existed...
Just repeat their name back at them in some friendly phrase/compliment after they introduce themselves.
The more parts of your brain and body you engage in part of the learning/memory/recall process, the more likely it is to actually stick in your memory.
That is part of why you probably remember silly dances with lyrics from Sunday School or Sesame Street or Barney or w/e better than you remember many giant topics you only read about in a textbook in school.
That and minimizing time between being presented information and then recalling it. Doing that right off the bat sets up that recall neural pathway right away.
YMMV, but I am autistic, and this has helped me for decades.... I had this problem as a kid... and I just actually studied theories of how brains learn and recall things, and there are actually empirically studied and verified methods of teaching/learning that just are more likely to work than others.