It was termed by as “obsessional neurosis” by Freud
Obsessive compulsive disorder is characterised by compulsive and intrusive thoughts along with repetitive actions.
Obsession is warranted by recurrent, unwanted, intrusive thoughts that cause distress. To reduce the stress and anxiety, you are driven to do actions in response to the thoughts, which are repetitive in nature, called compulsions. It can be mild or severe, depending on how intrusive the thoughts are and how time consuming the compulsions are.