A huge component of a secure attachment relationship between parent and child is a parent's ability to accept who their child is. When we accept our children, we teach them to accept themselves which leads to a rich inner confidence and resilience in a world that will not always accept them.
There is nature (who your child is) and nurture (how your responses to who they are makes them feel about it)
The difference between consequences and punishment is important to understand, as consequences are the natural outcome of an action and necessary for learning, while punishments are intentional pain inflicted to control behavior, which can damage the parent-child relationship and hinder a child's growth towards internal security.
Learn how to teach your kids the difference between insults and feedback, empowering them to take accountability for their actions and establish boundaries with bullies in this insightful video.
The most helpful way for a child to understand boundaries is to model it for them, and as parents, we should also honor some of our children's boundaries as well to protect connection and safety, not power.