It’s a popular commandment: Thou shalt NOT edit while you write!
But rules are made to be broken, right? Some folks spend an enormous amount of time upfront on their “editing” efforts, tweaking each sentence as they go, looking back while feeling forwards; they may make slow progress, but by the time they’ve put that last word on the last page, their “first” draft is almost finished!
For other folks it’s better to plough through to the end. Maintaining momentum is key, lest the real-time editing process leave them bogged down in doubt or distraction.