Do try to follow the advice of my sibling comments, but its also okay to find out you are simply really bad at remembering names. I think I'm in the bottom 10% percent in that regard. The only way I can somewhat manage to remember the names of the people I would like to is to use Anki (spaced repetition) on a semi-daily bases. This comes down to what others would consider a crazy amount of work, but at least it is somewhat successful. It frustrating for the long tail of people I might not meet again, but where it still would be really helpful to know their name. Where I really fail is situations that don't allow me to write down names shortly after they were used, which is often the case in introduction rounds. Trying to constantly repeat all names in my head means I'm missing on the other stuff people say.
As you point out, in some cases it's better to just accept that you're not good with names if the effort of trying to deal with it is affecting your other interaction with people. A former neighbour of mine was so bad at names and faces that she wouldn't recognise you in the street and walk right past you, making it seem like she was blanking you. Once I experienced that I realised that simply not being able to remember someone's name wasn't really such a killer, a lot of the time you can cover it up. Also, while you may feel bad about it, it's possible the other person has barely even noticed it, or if they have will forget about it 30 seconds later.