This is a phrase that gets used frequently when working with beginning writers. It’s important to have your writing come from something that resonates strongly with you. If there isn’t something about what you’re writing that you care deeply about, it will be difficult to put in the time and effort to make it the best it can be.
This is also a phrase that gets misinterpreted by beginning writers. Writing what you know doesn’t mean that you should translate events you have experienced directly to the page and call it a day.
What you know, in this context, is much more vast than most people are willing to give themselves credit for.
You know what has happened to other people, both those you know in real life, and those you know anecdotally. You have emotional knowledge of the way situations have felt, and this can be extrapolated to fit other narratives. Most importantly, you have the ability to learn and expand your knowledge.
Maybe the phrase itself is insufficient to explain its aim. Here’s another attempt:
When writing, start with what you know.