Another thing that I forgot to mention(I think):
IMPROVISATION
This is, IMO, likely the best way(but not the only way) to develop technique.
This may not be something that is easy at first and it requires a certain type of skill that is not something that typically comes natural because it requires many other skills.
But if you can sit down at the piano(or any instrument) and pick a key. Any key means you have reached a certain level and this comes from practicing all keys scales and chords and learning songs in each key and then improvising in each to get used to them. Likely if you only know C major you can still practice improvising but you will be limited because it would be like seeing in grayscale... better than nothing but not as good as full color.
Improvising will come more naturally as you learn. It is not something that just happens(although it might in certain types when there is a burst of emotion and you have reached a certain skill).
Everything you learn goes into it such as sight reading, scale and chord practice, song memorization, keyboard knowledge(intervals, chord voicing, fingerings, etc), etc.
Just remember that skills are not something that can be communicated through language but are things that one can do and are derived from practice. Communication can both hinder that process and/or accelerate it. It's hard to know until after the fact. Even a very bad teacher, for example, can, in the long run, turn out to have a great thing.
But no matter what is said, the more you practice the better. In fact, it is not just practicing the thing you want to be good at but ALL things. Do you know about topology? Or combinatorics analysis? Or the powerset? These things are other ideas that come into play that actually work to help you practice music better. Everything is related. It is not something that can be explained easily and explaining things can slow things down or temporarily slow them down or speed them up. Ultimately what you are doing with is life and piano is just one facet of life(a very interesting and useful one IMO) as is math(probably the most useful and interesting) along with painting, farming/gardening, life experiences, love, etc. Everything gets mixed into the pot to produce what you are and those unique combinations that are you give a unique result(a unique vector in a vector space). Even worrying and having "problems" produces a unique you. E.g., if you have tremendous stage fright and eventually overcome it with enough work then it can turn from a "net negative" into a "net positive". Same with anything.
So the real key is just to do and not worry. Don't worry if you are good enough(either you are or not and there is only one way to change it) or whatever. But do understand that if you want something you have to go get it to have it. We learn this innately as a baby and that is why we learn to walk and then run. But in a more complex world we tend to forget this(and in many ways our society tries to stop us or allow us to only have certain things) because of psychological and social issues. E.g. "I'm not good enough" (you are as good as you are and what is good anyways? Even the best are not good in the grand scheme of existence) or "Will they like it" (either they will or won't, the question is do you like it? If you're goal is to get them to like it then, well, that is also a skill to learn and part of that is to find out if they like it(which requires practice)), etc.
Everything is so very complex but yet is so simple too. The go is to know how to navigate between the two extremes efficiently... and as you might guess, it is practice. Just know what you are today shapes what you will become tomorrow and you will be that thing tomorrow when the "sun" rises. You are also the only thing that gets to dictate if you are good enough because you decide how good you want to be. Many people decide they are good enough at almost everything before they have any skills... that is their choice and theirs alone. It is not a competition no matter how much it seems. It never was a competition and never will be and people that tend to want to make something a competition are people who like competing. In no way am I saying competition is bad, I'm simply saying that it is not a part of practice. If it motives you to practice harder and faster and that is what you want then that is a useful facet to have.
Trial an error is not just a useful skill to have, it is all there is. [What do you think practice is?]