For me a great villain is what makes a story, you can have tremendous characters in a captivating setting but without the right antagonist to go up against it doesn’t reach it’s potential.
Motivations are where I think a lot of great villains stand out, a character who has reasons for their evil is justified. At least to themselves, one of my favourite bad guys from recent film is Thanos because he was different to the other Marvel villains. He wanted to save the universe not destroy it, great bad guys like that see themselves as the good guys or at least a necessary evil.
Back on the theme of D&D my favourite module villain is Strahd Von Zarovich, he’s created by jealousy and he’s driven by love. Again to himself he isn’t the bad guy, he doesn’t do what he does for the joy of it. But he would would tear through people to get his love.
So realistic motivations are important, but not if your players don’t know them, in my experience force feeding these key points to your players isn’t a bad thing. Sure I love leaving little clues and hints but it’s difficult to make them easy enough to follow and understand for your players who can’t see the whole picture and don’t know your antagonist like you do.
To get this across you need to build up your villain: the NPC’s of the world can talk of the villain, you can encounter minions bearing their colour or symbol, read history and text on them and their deeds, see their gruesome work after the fact, encounter marks or statues in their honour… The list goes on, you don’t want your players to only really experience your villain when they fight them. They should have an image of them in their heads already built up over sessions that shows them who they are, what they do and why they do it without even needing to meet them.
Though I’m not opposed to characters meeting my villains several times before the penultimate showdown, they can do battle with words or swords. Taunting them while they compete a crucial task, hunt them cat and mouse in a maze, engage with them while they race to stop a evil occurrence etc. You want your players to feel emotion towards their antagonist, whether that be hatred, pity or fear is up to you and your villain.