One of the most important things a writer can develop is a healthy skepticism about their own assumptions and worldview. We’re all living in bubbles, in a sense, and people naturally assume their successes are the result of their own virtues—that luck, privilege, and circumstance have nothing or very little to do with it. Realizing where your own assumptions come from doesn’t mean you change your mind about everything, but it does mean you can analyze yourself—which means you’ll be better able to analyze your characters.
Oddly, this sort of awareness and analysis can be paralyzing when it comes to writing characters in your fiction, because the more you realize how much of your worldview is the product of upbringing, environment, and experiences, the more you realize how little you understand your fellow human beings. In other words, the more you understand yourself, the less you understand other people.
Now, this is healthy, because assuming everyone else thinks and experiences life exactly the way you do is what gives us the gift of our Drunk Uncles telling us that Donald Trump is our political savior. You should have a healthy sense of doubt and terror when writing about characters that are drawn from walks of life other than your own. But it’s a mistake to go too far and assume that just because someone is a different gender, race, or culture they’re so completely unknowable that you can’t write them. It’s a mistake for two reasons: One, you’re wrong about that, and two, it leads you to write characters who are just you in different clothes, which is kind of boring.
This isn’t to say that you can sit down and write about someone utterly different from yourself without doing some work to get it right. But people all over the world have similar concerns, so it’s a mistake to assume that, for example, women are alien creatures with incomprehensible motivations. All humans share some basics, and humans within a specific culture share even more basics. Writing the Other isn’t always easy, and there are plenty of ways to go wrong, but the easiest way to go wrong is to assume that people who don’t look like you or live where you live might as well come from Jupiter and eat like Brundlefly.
Back in my college days, of course, a surfeit of lite beer meant I did sometimes eat like Brundlefly. Let’s not discuss it, ever.