How to start writing and not have it end up in an messy doc 100 pages long that goes nowhere, is heavily edited - although you are aware that no amount of cutting copying and reworking can save - and that won't ever be opened again after two months of fiddling?
For starters you want to use something like Scrivener or simple Word Documents & Folders to keep your chapters and snippets organized.
Makes for much easier editing and ease of access.
The rest is really just up to your skill as a writer, avail yourself to some reference materials to help with any problems you may have.
i think i have adhd and endup getting dis tracted after some time
so i keep a empty note pad open and write what ever my mind has just switched to
then i come back to the original doc and continue on
one of the key things is not to edit as you write, just write out a draft before you edit