How can I punish my son for slacking off at school?

Need some advice on how to punish my soon to be teenage son without being to rough that he would hate me but enough for him to learn. He’s starting to slack off in school trying to act all big and tough around his friends to fit in. Starting to talk back when he never used to do it. I really want him to grow up a decent good man. Any advice to moms who already went threw this?