Rubbing against the side of an enclosure or "wall surfing" are pretty classic signs of stress of discontent in a ball python. You issue is likely one or both of the following:
(1) Per Godzilla78, get a thermostat (and ideally a temperature gun) asap. You could be overheating your snake. A cheap, but ETL certified thermostat can be found here, or you can buy a herpstat which are often regarded as the "best".
(2) Your cage may be insufficiently cluttered for a young snake; adding more "clutter" may help. This can be done in the form of fake plants, additional hides, or simply wadding up paper towels an adding them in.