For me, the biggest thing is knowing my ingredients, and knowing my outcomes. (also mentioned by many above)
To get to this point, I do a decent number of SMaSH-type beers, and beers that highlight a limited number of ingredients. I also make at least a mental note on any commercial beers I try (or beers brewed by others), and track down particular ingredients that create a flavor I want. For my own beers, I take copious notes, and do a review of every single beer I brew. That way I can figure out if an ingredient manifested as I expected (and if it didn't, I can figure out if it was something inherent to the ingredient itself, or a process issue, or something else).
As I've built up my mental library of flavors and such, then I can start to build out recipes more creatively and confidently. And then as I brew them, I evaluate, and iterate, and apply what I learned to a future recipe.
Also as mentioned by others, if I'm brewing to style, I do a ton of research, and look for commonalities across recipes.