People are social animals. We have evolved to cooperate with each other. This gives us a serious survival advantage. Having said that, there are always outliers—people who need to spend most of their time alone. Other people get on their nerves—perhaps because they have a condition like autism, or perhaps because they just can’t handle the stress of working with and communicating with other people.
There are hermits—people who go off an live on their own. On the other hand, sometimes this annoyance with people could be situational. Maybe the people you are dealing with are all jerks. Maybe you don’t have the right people around you. Maybe you are having a tough time, and everything is irritating you.
I’d take a wait and see attitude. If this doesn’t go away on it’s own, then I’d visit a physician or a mental health professional, just to see what they have to say. I’m sure any competent mental health professional could find a treatable condition there. But, if it isn’t bothering you to hide yourself away, then maybe it’s not a problem. On the other hand, if this is a sign of depression, I’d seriously want you to see someone as soon as possible.