Use a crop and tap him on his butt when he doesn’t listen... not like a punishment but just reach back and tap a little and if he bucks tap him harder on his butt and then make him canter and if he keeps bucking keep using your crop and lunge him... he could also be lame and you might want you’re vet to come out because if he is lame then you might consider retiring him.
Rule out a physical issue (perhaps a sore back), then rule out issues with your tack (such as a saddle that pinches. Once you know these aren’t the issue, he is simply avoiding your aids. Raise your hands as he raises his head, so that he realized he can’t avoiy you above the bit, then keep your hand still and push forward into your reins.
Make sure to check that there are no bruises in his hooves and that the rest of his body is in good condition because he could be uncomfortable.
If u have a whip in ur hand or if there something new in the area ur working in can sometimes make my pony go a bit like that