Trouble with getting my thoughts out

I'm just starting to write and a thing I've noticed is that I can't seem to be able to just 'go with the flow' when writing the first draft. Like I often imagine stories in my head and how they would go line by line, problem is when I sit down to write all of that my brain kind of stops doing that and instead tries to recall what I've come up with before, which doesn't really work (or at least makes the process much longer). I know it will probably get better the more I write, but do you have any tips on how to overcome that?