We always aim to reinforce rather than punish. Whilst punishment is important in situations where children need to understand that something is wrong, using reinforcement allows us to strengthen behaviour that we want to see occur in place of the less favourable behaviour.
For example, a child hits another child, and you place them on time out. In this instance they learn ‘if I hit someone, I go on time out’ however they don’t learn any alternative behaviours for example, what I could do if I get frustrated with someone. Using it as an opportunity to teach alternative behaviours can be an extremely valuable experience for a child, in addition, focusing on reinforcing the good social behaviours you see if your child increases this behaviour, and decreases the likelihood of problem behaviour occuring in the first place.