I'm working on my first story, and there's two things I've found to be immensely helpful. First, write out the bare bones of your overall plot for a chapter or book, no details just events. Then go back and read what you've already written before writing the new chapter. Second, find some way to keep track of all the information about your characters, timeline, backstory...everything about the world you're writing about. I use onenote for that myself, but I would definitely checkout these other programs as well.
Hope this helps