A doppelganger antagonist is like the evil twin of your protagonist. It's a wonderful (fun!) device that can open up all kinds of possibilities for showing character and character growth.
In a nutshell, you make your antagonist and protagonist very similar so that they are like two sides of the same coin.
When they face choices or take action, you will highlight certain traits or codes of behaviour through their different responses. The doppelganger's extreme (or evil or callous or stupid) actions serve as a foil for the protagonist's heroism.
To give you an idea of what I mean by doppelganger, here are some examples.
First, Sherlock and Moriarty. They are both highly intelligent sociopaths who enjoy solving problems. However, they have made different choices in life; Sherlock uses his abilities to solve crimes, whereas Moriarty uses his to commit them.
The Doctor and The Master in Doctor Who. Both of these characters are Time Lords. They both travel widely through space and time and have the power to regenerate when mortally hurt. However, The Master's lack of empathy and compassion for the human race serves to highlight The Doctor's surfeit of these qualities. When The Doctor seems most alien, most 'other', The Master reminds us of how much more 'human' The Doctor is in comparison.
This idea of power and how people choose to use it, is also played out in season three of Buffy the Vampire Slayer. Buffy is a teenage girl with super-human strength and a sacred duty to kill vampires. When the show introduced another slayer, Faith, it demonstrated how differently Buffy could've handled her power. Faith doesn't worry about consequences of her actions, listen to authority, or show the same moral compass, all of which reminds us of Buffy's essential goodness.
In each of these examples, the dark side of the protagonist's character (or dark choices they have the power to make), is fully explored by the antagonist, making us appreciate the protagonist's positive choices/behaviour all the more.
You can also use a doppelganger antagonist to show how your protagonist has changed (often referred to as their character ‘arc’) over the course of the story. Have your protagonist and antagonist face the same choice or have the same goal at the beginning of the story and then again at the end. Your protagonist makes a different call (showing how they have grown and changed through the action of the story), while your antagonist makes the same choice (showing that they haven't).
There are endless possibilities for the antagonist-protagonist relationship in fiction but I must admit to having a real soft spot for the doppelganger trope. And not just because of Benedict Cumberbatch and Andrew Scott …