Many of us like to admit that their head is like a sieve. It seems that they are even proud of it! Stop telling people that you don't remember names well. It's better to say that you remember them perfectly, and are ready to confirm it even now.
If several people have the same name, try the following:
If you don't know other people with the same name, try using the sounds of the name to memorize: repeat it several times, stretching the vowels (the funnier the better), or break it into several parts.
You can associate these parts or the whole word with other words (for example, Albert — easel). If you are dealing with a long or complex foreign name, come up with a whole sentence or a short story.
When you are introduced, look into the person's eyes and listen carefully. Try to repeat his name out loud or to yourself, ask again: "Am I right?", "What did you say?", "Repeat, please." You will not only remember the name well, but also pronounce it correctly (which is especially valuable if the name is exotic, unusual).
Clearly imagine each letter (let them flash, dance, spin in front of your mental gaze), while voicing them to yourself. For example: "Rafis — Er, A, Ef, I, Es — Rafis".
It is always useful to have a pen and a notebook with you to jot down a name when you find yourself in a secluded place. Next to the name, put a short description of the person to remember him next time. For example: "John, a real estate dealer from Portland." This helps to remember the name well, because you will encounter it every time you open the notebook.
If you need to remember the names of several people with whom you will have to work later, create a file on your computer where you write down the names and a brief description in the same way as in notepad. This is convenient: when one of them tries to contact you, you will immediately remember who it is.