Villains and Antagonists are what push your main characters to grow and get better. They push your story ahead and will probably be your protagonists’ final boss. But making a good antagonist is easier said than done. So what goes into making a good one? Well, I’d like to start with the old saying that your antagonist should be the protagonist of their own story. This doesn’t mean give your villain their own plot wholly disconnected from the main plot, but instead, flip the main plot around, and see, in your head, if you could tell the story you want to write from your villain’s perspective. To assist with this, I recommend building your antagonist and protagonist at the same time. As you do so, try to be even handed with things. If possible, make your protagonist just as villainous as your villain, just in different ways. Also, give your antagonist heroic qualities, show that under different circumstances, they would be a good person, and perhaps, even on the same side as your protagonist. Good examples of this sort of antagonist are Tohru Adachi from Persona 4 and Goro Akechi from Persona 5.
Now, it’s entirely possible you’re not writing a story with a human antagonist. Your antagonist could be nature, god, or something wholly incomprehensible. In this case a lot of what I just said doesn’t apply. While you should still build your antagonist alongside your protagonist, you can’t exactly have a rockslide being just as much of a protagonist as the protagonist. Instead, your should try to design a landscape or enemy that plays off your protagonist’s flaws. Create something that pushes them to their limits and forces them to become a better person in order to survive or triumph. If your hero is scared of heights, force them to climb a mountain. If her brother was killed in a storm, force her to become a stormchaser.
As always, there are further exceptions to my first advice. If your villain is a physical embodiment of some concept like evil itself, or chaos, you can’t exactly build a protagonist who’s just as evil. Or maybe you can. Don’t let me tell you what you can and can’t do. The issue just comes from the fact that it’s hard to give character to someone who is “evil”, or is “chaotic”. Joker from Batman is about as far as you can go with characterizing a villain like this. Joker’s personality begins and ends with, is chaotic, loves dark humor. I realize that this is just skimming the surface of what goes into villains, so I may come back to this with a narrower focus at a later time, but for now, I hope someone out there found this helpful as they start to write their story.