I struggle with getting into the 'space' of creating via procrastination. When I'm actually mentally locked in, I feel that I'm all the way locked and my flow of creativity can't be stopped. My suggestions would be to limit distractions as much as possible -- set the setting for yourself. It may sound funny, but I burn Sage, smoke, make sure I've eaten and then get down to business with all my distractions eliminated as much as possible. As far as writing itself, I write a couple different ways -- if I have the beat already, I typically mumble rap or mumble melody throughout the track on repeat, or maybe loop the chorus. If anything I say during the mumbling of the verses/ chorus that's "dope" or sticks, I write it down immediately.
There's a unique approach to everything, especially if you already have a "pre-topic" for whatever beat you're working on. At times it can feel like you're in a box and can only dance around a subject matter only so far. So, again my suggestion would be to eliminate all distractions, prepare your setting, and try to find melodies or bars by jibberish/ mumbling throughout whatever parts you are working on - or if you have another song or project you're working on and you're really stuck, just move on and come back to it. Hope this helps