Creating memorable NPCs is one of my favorite parts of DMing! One method that works well for me is giving them a unique quirk or catchphrase that players can latch onto. For example, I once introduced a potion merchant who spoke in rhymes. It not only made her stand out but also turned every interaction into a little game for the players to decipher her verses.
Backstories are crucial too! I find that tying an NPC's story to the players' backgrounds can create natural connections. Maybe an NPC is the long-lost sibling of one of the characters, or they were involved in a past event that shaped the party's motivations. That way, when the players interact with them, it feels personal.
Do you have any specific NPCs that have stood out in your campaigns? I'd love to hear about them!