I would probably try to handle your snake a little less for the time being and try to give your snake a peacefull enviroment with the right temps & humidity. also know that alot of ball pythons go off food sometimes and they can go a long time without food! just monitor that your snake doesn’t get too skinny, if he’s getting extremely skinny i would definitely check with a good vet if there’s a medical reason why he’s not eating.
This is not very related to your snake not eating but just a thought i had; I don’t know what kind of setup you have but you could try if adding some enrichment to his enclosure will help with the tapping/pushing on the glass. my snake really enjoys climbing for example (i use oak sticks thick enough to support the snake’s weight and before putting the stick(s) in the terrarium i bake it in the oven to get rid of any insects)
Hope this helps and sorry for the long read😊