Make the antagonist embody the negative values that the protagonist rejects
If your protagonist is on a journey towards love, life, and happiness then your villain may represent death, decay, and unhappiness. Often a protagonist will learn who they are throughout the course of a story, and eventually actively chose the values in the final confrontation that come to embody their new sense of self. The antagonist should represent the values that the protagonist rejects. For instance, in Star Wars, Luke choses not to give into the allure of the dark side offered by the Emperor, even if it means saving his own life, and the lives of his friends in the rebel fleet.
Have the villain grow in strength and power to build dramatic tension
Dramatic tension in your story should rise. One way to achieve this is to have the antagonist grow in power, even as your protagonist moves closer to achieving their objective. For instance, in Lord of the Rings, the power of Sauron grows with each passing day, as he gathers the forces of darkness around him, and builds his armies. Voldemort grows in power as he gathers his Death Eaters, and assumes corporeal form.
Make sure the villain is defeated in the final confrontation
The villain should be finally defeated in the final and largest climax of your story. This final confrontation should bring to the surface the theme of your story. For instance, Harry Potter walks out to meet the Death Eaters, sacrificing himself. In this way sacrifice is centralized as a theme. You may find ‘self sacrifice for all that is good’ is central to many tales.
Make the villain complex and appealing
If your antagonist has followers, and they probably should, it’s likely that there is something appealing about them. Lucifer was the most powerful and beautiful of all the angels before he fell, which is also true of Sauron. The devil is often portrayed as charming. Voldemort inspires admiration and loyalty in his followers through fear and the promise of power. Give your antagonist complicated and contradictory beliefs that confound and confuse their followers (gaslighting them): Hitler was a vegetarian because he hated the thought of animal cruelty.
Reveal information about the villain gradually
Villains are successful partially because they hide their true nature and power. If a villain appears on the horizon, guns blazing, the forces of good can prepare an adequate defense. But if your villain hides in the shadows, obfuscating the extent of their power, and even creating doubt about their very existence, then the forces that might be mustered in defense may never be roused to action (Lord of the Rings, Harry Potter). The greatest trick the devil ever pulled is convincing the world he doesn’t exist!
Remember, villains enjoy being bad!