Obsessive–compulsive disorder – Wikipedia

Obsessive–compulsive disorder (OCD) is a mental disorder in which a person has certain thoughts repeatedly (called “obsessions”) or feels the need to perform certain routines repeatedly (called “compulsions”) to an extent which generates distress or impairs general functioning. The person is unable to control either the thoughts or activities for more than a short period of time.

https://en.wikipedia.org/wiki/Obsessive_Compulsive_Disorder