I read a Quora question recently. It was first published a year or so ago, then updated recently.
The question was what every aspiring writer should know and I liked the best answer. The one up-voted to the top of the answers:
Here is the link: If you don’t feel like following the link, I’ll paraphrase:
Put the seat of your pants in the seat of a chair for eight hours a day, five days a week. Do this in a quiet place where you can concentrate on writing and only writing. Because being a writer is a job and, just like any other job, requires a commitment of time and energy and the ability to focus on what you are doing.
When you are a professional writer and no longer an aspiring one, then you can write however you wish, whenever you wish, in whatever way you wish. Until then, follow the rules.