I agree with what’s said in the above response, your snake may just be doing that out of boredom or stress too. Make sure your snake has hiding places to go to to feel safe and if it is boredom you could get a bigger cage with more things for him to do and/or take your snake out more often to hold and hangout withhope this helps and i hope the nose rubbing stops soon!