When I'm writing, I never edit chapters as I'm writing them. I will write out my entire first draft of my story before going back and making any edits, so I know my edits are serving the greater purpose of the overall story. If I'm going through my first draft and I realize I need to go back and change something earlier in the story, I don't go back and change it, I make a note to myself right in the document as I'm typing, like (make sure Spark finds the ring before meeting Tanahi) or (add foreshadowing to this event in chapter two). Then after I finish my first draft, I'll go back and make any edits I caught for myself.
After I've gotten the story as good as I can on my own, I'll invite some friends to read it and give me their thoughts. I'll share my Google Doc and they'll make notes right in the document just like I do.
With their input, I'll go back and do one last pass of editing, and then my story is usually done. I may leave it alone for a few weeks and reread it one more time with a fresh mind to make sure there aren't any glaring issues I just got too familiar with to notice, and then that's it!
Once I publish something online, I never go back and change it. In my mind, if I've put it online, that's it, and I'm stuck with what I put out into the world.