PLEASE TAKE YOUR CAT TO THE VET IF YOU SEE THEM DOING THIS BEHAVIOR OVER TIME.
It’s called “head pressing” and it occurs in dogs and cats.
Head pressing is characterized by the compulsive act of pressing the head against a wall or other object for no apparent reason. This generally indicates damage to the nervous system, which may result from a number of varying causes, including prosencephalon disease (in which the forebrain and thalamusparts of the brain are damaged), or toxic poisoning.
My elder cat had head pressing as one of her symptoms when she had toxoplasmosis. Many people, dogs and cats have this, and the vast majority never get sick, but when it arises as clinical disease, it usually presents as neurological problems and brain damage.
HEAD PRESSING IS A SERIOUS SYMPTOM OF BRAIN ISSUES, DON’T IGNORE IT!
As a cat owner, I can confirm 50% of the time I am kissing my cats soft head and telling her how much she means me, and the other 50% I’m angrily telling her not to eat plastic