I think if you asked any writer they would have different advice about habits in writing. About what helps us write.
For example, I like to make character or mood playlists to listen to while I write. It helps me get into the zone of writing. It doesn’t always help, but it usually does. Other writers however like a quiet area to write. Right now I have no music on, as there is no specific mood I want to be in, and I’m not writing a story so there are no characters or relationships I want to focus on. Sometimes on days I have had too much noise stimulation (a trigger for my anxiety problems) I write without sound simply because I can’t stand more noise.
But most of the time I have music playing.
Another habit of mine is to write on my laptop. Some writers prefer a keyboard while others prefer pen, pencil and paper. The reason I prefer the keyboard (and a regular sized one, not one on a tablet or phone) is I can type as I think. I don’t write nearly as fast as its coming to my head. Not that typing doesn’t end up with a few mash up words too. I am always amazed by people who hand write their stories, because to me that takes a lot of time, dedication, and pain as writing for long stretches ends up making my hand cramp up. I do carry around a small memo pad in my bag to jot down any scene or idea that comes to me when I don’t have easy access to my laptop. And sometimes I write short stories in notebooks while on breaks between classes or work.
Every writer has habits they keep to help them write, or feel comfortable as they write. And each writer has different habits. The trick is to find out what your own are. Is it playing music while you write? Finding a nice empty silent corner and writing away in your notebook? It might be finding a really comfy chair or a cafe or library where the ambient noise is comfortable to you. Maybe its doing a daily sprint where you do nothing but write for a period of time.
There isn’t just one way to write, so while any writer could give advice on what to do to help you keep writing, it usually just comes down to finding out what helps you.