Your child is still learning how to handle setbacks and disappointments. If he is not able to accomplish a task or do things as planned, it can be frustrating for him. There can be behavioural problems like occasional meltdowns, talking back, emotional pain, etc. Overall, he exhibits better self-control than before.
What you need to know
Communicate with your child. Let him know when he has an issue, he will be heard, guided and loved by you. He still needs that security and comfort, even though is growing to be independent. This way the chances are more that he discusses the problem with you and not navigate to frustration directly.
When things don’t go as planned and your child gets frustrated and defiant, give him his quiet time. Ask him to first calm down and just reflect on his behaviour in the quietude of his room.
Always try to maintain a positive tone when your kiddo loses his cool. This is difficult, but if you react the same way, the situation worsens. Emphasize on how he can behave better rather than criticizing.