some times it's not a matter of doing something wrong, but more like just being the person. it can take some time to get to know each other, and after a while you can suddenly find out that it doesn't actually work for you to be together that much. clashing personalities isn't all that fun, but you can't just change who you are, all of your preferences, dislikes, needs etc in order to make a relationship work. it's much better to find a person who matches you a little better.
and it really does take going through puberty and some more just to find out who you really are. t might be what made your true self so apparent that things wen't awry, that doesn't mean you did anything wrong. you made an honest try, and it turned out that you just don't fit together. what you can learn from this experience isn't so much what not to say or do, as what type of person you are, what you want from a relationship, what another person shouldn't expect from you.
the only way we can learn about ourselves is through interactions with other people. those of us who aren't lucky enough to find the right one on the first try, can only move on and try again. try to remember the signs you should have seen of things not being right, and don't ignore it if you see them again. you might be unlucky and have another relationship that goes wrong for other reasons, but... that's just a chance we'll have to take. trying and failing like most people have to do.