Most of you probably wanna say "both". ^^ But if you wanna vote in this poll, you're gonna have to choose a side:
For those of you who need some more context-- it's the question of whether it's better to "write what you know", or write stories about what you've managed to understand, even if you don't have firsthand knowledge of those experiences.
My vote is for Understanding...as I am a sci-fi-fantasy specialist, it kinda has to be. ^^; However, I do think experience is very important.
Like, you don't have to take "write what you know" literally, and forbid yourself from writing about any character or setting that can't be directly referenced from your own life. BUT, your stories will be stronger if some kind of personal experience is always at the heart.
Like, let's say you want to write a passionate love story between two young adults living in Canada-- you don't have to live in Canada, you don't have to have visited Canada, and you don't have to be a young adult. You don't have to have been in a romantic relationship; you don't even have to be personally inclined towards romance at all. All that is stuff you can research and understand if you really want to have it in your story.
It's the character arcs that should hinge on personal experience. When you're crafting these people's hopes and fears and desires and motivations, that is where you need to dig deep and look within yourself to find the emotional energy to guide the story.
Let's say one of the romantic partners is thinking about dropping out of university, because they don't feel like they're smart enough to finish-- when you were in school; how did you feel when you got a lower grade than you wanted? How do you feel when you can't measure up to your own expectations, or the expectations of others? What pressures make you feel small and stupid and unworthy; like a certain challenge isn't worth trying...? Channel that into your work.
To give another example, let's say the other partner is a wealthy snob who's used to getting everything they want immediately, and has to learn patience and compassion over the course of the story-- if you've ever been particularly privileged, how did you treat those who weren't as fortunate as you? If you've ever met someone with significantly more privilege than you; how did you feel you were treated? When do you struggle to show kindness to other people? When are you tempted to act selfishly, and how do you reflect on your behavior afterwards? What do you think it means to improve as a person, and adopt new moral ideas into your life...? Channel that into your work.
When your readers feel true connections with your characters through their emotional arcs, they will be much more willing to forgive the inevitable mistakes that arise from your inevitably imperfect research. Most of them will see a flawed story that still has heart and soul and can be enjoyed anyway, rather than a flawed story that should be ridiculed because the author clearly has no idea what they're talking about.
As a sci-fi-fantasy writer, this is basically the strategy I use to make sure my stories are compelling: the alien worlds and the lore and worldbuilding and magic systems are all secondary; if you hook the reader in with something recognizably human, a conflict or idea they can understand instantly, they will be more willing to wait for you to explain the rest. Heck, they may not even need you to explain the rest.
And because of that, I think it's a good strategy to keep in mind even when writing about more grounded, realistic settings. You may need to gain understanding to build the illusion of experience in a certain situation or location, but everyone already has the built-in experience of being a human being. Learn how to use it, and you'll automatically have the foundation of a great story. You'll be able to "write what you know" in the most fundamental way.