I can't consciously grab hold of what happens when I write a song. I never write in a formulaic way. I don't think about music theory when I'm writing. I don't think about what 'should' work or 'shouldn't' work. I just allow the song to emerge ...
And that's the process for me. I can't force a song to be written. I can't just sit down and decide to write a song. The song will only be written when the time's right for the song; that's just how it feels.
And yet, to go back to the songwriting process, I'm not sure what I do to write a song. It's feels more like a process of me having to capture what emerges through my fingers on the guitar or piano, or through my mouth when lyrics & / or a tune begin to emerge, or even what I sometimes hear vaguely playing somewhere in my mind. I'm not consciously creating the song ... it feels more like it emerges through me & I have to catch it!!
Does that matter though? The final creation is what matters ... the song; no matter where it comes from, or how it gets there ...