you hear this phrase and it can be frustrating as hell. What about the things you are passionate about learning about? no one is saying to not learn and then write, or write a scene and then double check the logistics if you are that kind of person.
I think this is possibly one of the many ways people allow themselves to become discouraged when writing.
Write what moves you, write what you feel a connection to. If you are not an expert- don’t write as tho you are one. take time to learn, ask questions, do research and be willing to take criticism(both from yourself and others)
if you cant take criticism you wont survive the editing process – you learn alot about how you write when you have to edit. or when you get peer editing.
write with feeling, write connected to the story on some level.