Learn to think others' thoughts. Learn to put them on and take them off again. This develops compassion.Stereoscopic vision is how we have depth perception; each eye sees an image slightly different from the other, and how the brain integrates those differences tells us which objects are further away than others. It's the same in writing: respecting the differences between different characters' world views will give your writing depth.
But more than that, it's the writer's version of stereoscopic vision: you can't write realistically until you can step behind someone else's eyes and see their world exactly the way they do, and then step back out again to see your own vision. The best writers can see both, with all their subtle differences, at the same time.
In more recent public discourse in America, we see the lack of empathy, the inability to look out through the other side's eyes in order to understand the world as they do. Instead of understanding the opposition, each side sets up a caricature of the other side, and doing this immediately raises hackles of the ones not-listened to. Check it out: pick an issue (it doesn't matter which) and both sides are doing this.
It's not working in politics, and it's going to be even more a disaster if you try that in your fiction. Because at some point, someone who thinks like your character (or used to think like your character or knows someone who thinks like your character) is going to read your book. And for them, it had better ring true or you're going to lose a reader.
When writing, it is essential to be able to look out your characters' eyes and understand why they believe what they believe. It is not enough that your villain wants to take over the world. You must be able to tell us why.
Moreover, when writing from your villain's perspective, it is imperative that you the author also believe he is right. Otherwise your fiction comes across as preachy and message-driven, and your character will not make logical choices.
Then once you're out of the scene, you can return again to yourself. That means knowing yourself enough to be secure.
Stereoscopic writer-vision requires listening to people with whom you violently disagree and learning why they believe what they do. You can't just mimic their words: you need to be able to put on that opinion and then shed it again.
That means reading source material written by people who believe the thing you're opposed to. That means listening to opinions you could never possibly hold and figuring out why a smart person like your character would hold that opinion.
As someone smarter than me once said, Test everything. Keep what is good.
Learn everything. Keep what is good for yourself, but don't be afraid to share all of it with the people you're creating. If they have a cause, make it a cause worth believing.
No one wakes up and says "Today I'll become an arch-villain." But many wake up and say, "I'm going to make it a better world, no matter what I have to do in order to make it that way."
Give us different people to read about. Give us differences, and differences give your stories depth depth.