There is no formula to it. Writing every song is a little journey. The first note has to lift you.
I know every note in every song, the whole history of it, even parts that were there and are gone.