I can’t imagine writing in a coffee shop. But we see that in movies and TV shows all the time. it’s different for different people, but I believe I write best alone.
Purchasing a laptop really helped, although having an office and a desktop where you can close a door is great too. But for me, the laptop allowed me to write away from an internet connection in my car where no one would bother me.
Go somewhere you can tune out your surroundings. Find a time when distractions aren’t likely. Put the smart phone away and any other temptations.
If you make writing time about writing, you’ll be able to write, and the further away you can get from all the things you need to do around the house, the easier it’ll be not to procrastinate.