I think many persons with OCD feel very lonely.
I guess it depends on the degree of discomfort the OCD is causing and the different types of compulsions and obsessions.
If you for example:
1. are dealing with fear of germs... it can be really hard to lead a social life. The deep anxiety of bacteria with the obsessive thoughts and compulsions causes a lot of distress.
2. If you're having a really hard time leaving your home when going out... it might make you stay at home rather than facing your "monsters". To walk around checking everything in your home over and over again is oh so draining.
3. If you feel the need of a certain symmetri and order in your home - you might not want others to come into your home and "mess with" your structure.
... and so on...
Having OCD is something you almost always do everything you possibly can to hide from others, which also can make it hard to be around others.
OCD is something I believe you can't really understand unless you have it yourself. That can also discourage one from socializing.
But keep writing out here and you'll find: information, support and compassion from others sitting in the same boat.
One day at a time... Remember - you're not your disorder... you're a unique person... valuable!
/daynnight