I have a daughter, that is 10 now.
One of the most important things is, your "relationship" with her.
No matter what age. Which is nurtured all along the way, from babyhood.
Even if a child, goes through icky "tude" phases, per age, they still need... a Mom. Or another parent, to be close to.
For me, per my kids... I know if they are just giving "tude"... or if they are really just feeling icky, and need me. So I adjust my reaction to them, accordingly.
Keep in mind, if a child is feeling icky/frustrated etc. or going through emotion based changes or development, it is hard on them, too. BUT being they are a child.... they won't say "Mommy, I need you right now, I have things bothering me emotionally...." So they need us, to be their "radar" also. And to be there for them, at those times.
Lots of kids, don't even know themselves nor their own feelings or why they feel a certain way.
My late Dad used to say, that if a child cannot or is not allowed to vent or express themselves at home... to at least one parent, then.. who or where, will they do that with? And the answer is: it will be with outsiders or with other people or at other places, with whom you don't even know.
Thus, my Dad, used to be very aware of our cues. Not being a "friend" but a parent... who guided. And he was there when need be and was always there, to talk with about anything.
If a child, is always expected to be, spot on and perfect... everywhere and all the time, at school and at home... then at some point, they will get all pent-up, and this is also what causes problems. Because they have no where, to be themselves or to express themselves.
Kids either get bratty just to be bratty, or they have "real" reasons for not feeling all happy as a clam and pleasant as a daisy. So for me, as my kids' Mom... I really gauge my kids. I know, if they are just being a "brat", or if something else is churning underneath the surface. And I talk with them. They can tell me, anything. Without fear.
A child being themselves and being self-assured and being mannered, starts from the beginning of their lives. Not just at a certain age. It is like a rock collecting moss.
For me personally, since my kids were 2, I taught them to know themselves, to be themselves. So that once they are in school, they are not just followers or copy-cats and can be more self-reliant and to know... their own feelings and to choose friends wisely etc. And along with that, the relationship with me and me with them, is built.