The only effective punishment/threat that I saw work on my bullies at school was the threat to remove one of them from the football team and prevent him from playing for the school. He turned it around and was ok after that.
It was highly effective because it was a bigger punishment than those used for not doing your homework, and because it was highly relevant to him specifically. It worked because we had 16 students to a class (I was very privileged to be there) and teachers who gave a crap and put the time in to understand the problem and think of potential solutions, rather than just apply generic policy.
The problem is that most schools don't do that, would likely argue they don't have time to do that, and also probably spend a fair amount of resources and time on relatively ineffective bullying prevention.
Surely expelling more effective from the school's perspective.
The generalized version of this is "take away something they care about". But it's not always easy to do. In many cases, schools have nothing the kids care about. If they do, rules often prohibit them from using it as leverage. And in many cases parents also are unwilling to apply any kind of consequence that would make their kid unhappy.