Make it a point to remember a recent acquaintance's name. Acknowledge that you remember them the next time you meet by greeting them using their name (e.g. "Adityavikram! Good to see you, how was your weekend?")
People always feel better when you remember their names.
When you don't remember try introducing them to a friend you are with. For example, if I am standing with Adityavikram at a party and a girl I don't recognize comes to say hi I would say "Hi! This is Adityavikram, I don't think you've met." and gesture the two to introduce each other, forcing the girl to say her name.
Lastly, pronounce peoples' names correctly. Last names that are foreign to you might not be natural to pronounce but this is not an excuse to butcher a person's name and laugh it off. Ask politely and apologize when you think you might be saying a name incorrectly. Don't assign anyone a nickname just because you can't learn to say a name. If someone prefers to be called a different name/ nickname do not question it. If Shang Tsung wants to be called "Steve", don't ask why and remember to use this name.