Once you've finished planning the main points of your story (beginning, rising action, climax, falling action, resolution) and you move onto writing the actual story, write the first few sentences. Doesn't have to be anything special. Just how you're gonna start off the story.
Now, what you wanna do is write how the story will end. It can be as long as you like, and you can change it later on depending on how the lore plays out.
What this does is gives you an idea of where you're going. This reduces the potential of creating too many subplots, or going off track from your plan. Since you know what you're aiming for, you know how to plan your events around that.
If you're writing it on paper, write it on a seperate piece of paper, or on another page and tear it out. Make sure you keep it somewhere where it won't get lost. Whenever you get stuck, check it. If that doesn't work, go back to your plan, or just do some free writing.
Hope this helps :D