It takes practice...it won't come overnight.
I was good enough at one time, that I actually worked in the kitchen of a Country Club as a cook. But I had made and eaten alot of horrible meals of my own before I was good enough for that. And when trying something new, I still have to make several tries.
Start with simple dishes and get good at them.
And the K.I.S.S. (Keep It Simple, Stupid!) rule that applies in other arts also applies in Cooking as well
Keep things simple. Don't use alot of different seasonings or ingredients when starting out...wait til you get good at the simpler stuff first, and keep them few.
Some of the best dishes in the world are very simple.