A better way is teaching, listening, and when necessary taking away priveleges, such as freedom, a toy, or driving the car. If your young child is having trouble sharing, listen to him, teach him a better way, ask him how to solve the problem. Then if the problem continues, you can take the toy away until he and his sibling figure out a way to solve their problem.
If your teen is having trouble turning in assignments, or getting to school on time, talk to them. Ask them to find ways to solve the problem, and be willing to try them. If the child seems unwilling to change, you may have to take away the car or his iphone until the behavior gets better. Always teach that this is because priveleges come with fulfilling one's responsiblities. This is how the real world works, and if they learn it at home, it will help them to be successful in the world.
Teaching, not punishing, will preserve the strong parent-child relationship that helps you to have influence over your children.