Here's an interesting tidbit about antagonists in books. I've noticed how often the villain of the book is some kind of authority figure, and I'm very interested in what that says about the stories we tell each other.
In some traditional stories, yes, we have the protagonists representing order and law, such as when cops have to catch criminals in police procedurals or when teachers have to help kids overcome their difficult life circumstances and succeed. But more often, it seems like the villains of stories derive much of their power from being in authority, and protagonists spend much of the story trying to escape, discredit, beat, or avoid detection by someone who's in charge and means them harm.
An oppressive authority figure is something we all understand and inherently fear enough to find them believable as villains.
And now that we have SO many stories about plucky protagonists taking down the corrupt king or destroying the magical bureaucracy or stopping the alien government from blowing up the Earth or convincing the corporate fatcats not to shut down the youth program or exposing the conspiracies in the government or awakening the people to the inequalities inherent in the system or destroying the status quo for the good of the people . . . we really have to address the problem of compelling villains.
A villain has to be understandable for their defeat to be satisfying. That does not mean the villain's "side" has to be equally sympathetic, or that you must enhance them with a tragic backstory so their evil will be believable. The bad guy just has to make sense, even if their desires are selfish and their refusal to stop oppressing the protagonist(s) is based in stunning lack of empathy. A villain who ultimately just wants money and power can still make sense, as long as their motivation doesn't sound like "and then I will be even richer, mwahaha! I can buy more condos and my own island, mwahaha!" A villain who hates humanity because of personal scars can still feel realistic as long as their history doesn't sound like "I was made fun of in school and abused by my parents so I concluded humans all suck and now I want to kill them all even though I'm also a human, mwahaha! Humans are inherently flawed and need to be destroyed, mwahaha!" Villains still generally think they're right and very rarely make sense as a baseless ball of hate. If you write them as if they're just there for the heroes to beat, you might still have a story worth reading, but it will lack depth and usually will be unsatisfying.
What you might try when you write a complex villain into your story is imagine how that story would read if it were from the point of view of your antagonist. You don't have to actually write it, but maybe consider outlining it. Kill your urges to use cartoon villain language about your protagonists and try to see them how the villain would truly see them, and develop some stakes for the villain. What does the antagonist want? To avoid prison? To get money for a certain purpose? To settle a score? To make something they think is beautiful at the expense of our heroes? To send a message? To uphold a promise?
This guy to the left, a cartoon villain named Amon from Legend of Korra, had a lot of stereotypical villain aspects, but his position actually made sense. Our heroes are mostly people who have their world's version of superpowers, and most of the government there is run by people with superpowers. This guy was spreading messages about how unfair it is that the have-nots are not represented in any real sense in the world and that the hero-worship of the superpowered people was making a bunch of aspects of society suck for them. Of course, this guy was a giant hypocrite and had some other shady things going on, but his messages as a charismatic leader were actually the kinds of things that would have gained him followers. You didn't get the sense that the people who joined his movement did so because they enjoy evilness or were brainwashed. They did so because he made them wake up to an inequality that was affecting their lives, and he made them think they could have more control over their destinies.
This is a short one today, but I'll finish it with this: I beg you, writer folks, please stop motivating your villains with "insanity." Not only is it awful for people who live with mental illnesses (and those who care about them) to keep seeing "crazy" people as the bad guys all the time, but it's just lazy writing. If your antagonist's entire reason for creating the circumstances the heroes have to fight is because "they're crazy," you are literally saying you know their motivation doesn't make rational sense and therefore you can stick in whatever story elements make it interesting for your heroes. And while an occasional villain with a mental illness is compelling--like some of the better-written serial killers whose obsessions make them dangerous--it is grossly overused and often executed hollowly. The best villains are the ones who do have a pattern and a sense to their villainy (which many serial killers do, too).
You don't need to make us love your bad guys, but you do need to make them worth the fight.