Is there a wrong way to play piano?
So yes, there are right and wrong techniques for learning the piano. If a technique works for you don't be discouraged if someone else does it differently. Right and wrong is more of a subjective experience when it comes to learning piano and what works for one person might not always work for another.
Why do I keep hitting the wrong notes on piano?
Something else that can contribute to hitting wrong notes is inconsistent fingering when playing. You should be using the same fingering every time to play a piece, assuming the fingering you've chosen is efficient.