There is a popular notion that artists work from inspiration—that there is some strike or bolt or bubbling up of creative mojo from who knows where… but I hope [my work] makes clear that waiting for inspiration to strike is a terrible, terrible plan. In fact, perhaps the single best piece of advice I can offer to anyone trying to do creative work is to ignore inspiration.
I'm currently reading Deep Work by Cal Newport and found this great piece of advice. There's an article by David Brooks in which he summarizes this more blunty, saying that you should
think like an artist but work like an accountant.
If you feel like distractions are hurting your productivity, go buy this book, I can't recommend it enough.