That takes rewriting.
Sure, I'd like to have my work be perfect the first time. I also know it's not going to be that way. I have particular difficulty with beginnings. For every novel I've written so far, the scene I started the novel with on the first draft isn't the one I was supposed to start the novel with.
Yes, I find this demoralizing. Now when I'm starting out I have to sit down and ask myself very seriously, "Where does the main conflict of the story start?" And I remind myself that a main conflict is not necessarily proprietary to one character, nor does it focus crucially on a character's history or on that character's world. But I still second-guess myself all the time, because I want to get it right. I keep hoping that my first drafts are going to be good.
If I were to let these worries shut me down, though, I'd be nowhere. There's no way to finish a story that you don't start! So I try to think back to writing my big school papers, where people used to say to me, "Write the introduction last. How will you know what you're going to say until you've already said it?" I get all my character, world, and language ducks in a row and dive in, figuring I'll end up returning to the start anyway - because there's no such thing as making it perfect on the first try.
Then, of course, the problem becomes how to know when it's finished. At a certain point you get to a place where you're just changing a word here or there, and you can't see anyplace to make it better. The problem is, that doesn't necessarily mean it's the best it can be - it only means that your current view won't show you any way forward. This is the point at which I go looking for critique. Someone else will have a different angle on my story, that will show me where I can go next. As I've discussed here before in Critique and the Writer's Compass, it's important to keep one's own goals in mind at the same time.
One of the most interesting things I've heard about the sculptor Michelangelo was that he said this about sculpting:
“In every block of marble I see a statue as plain as though it stood before me, shaped and perfect in attitude and action. I have only to hew away the rough walls that imprison the lovely apparition to reveal it to the other eyes as mine see it.”
So the idea is that the sculpture is already there; he just has to sculpt away until he gets to it.
This isn't far off from the way I feel about revision. There is a difference - in my case, I can't see the end product from the start, and only have an idealized vision of what I'm trying to achieve. But this metaphor works for me - and in fact, this is the reason critiques don't bother me (they actually inspire me). I rejoice every time someone gives me a glimpse deeper into my own story, because often enough once I've sensed that deeper level, I can carve the entire story more deeply to match. For me, the perfect story is in there somewhere, and I have to find it. Every revision that pushes the story deeper is one step closer to my goal, and each opportunity for a critique that offers me a fresh view, from a unique angle, is a potential opportunity to see through the veil of stone and find the treasure inside.