Is it okay that I stopped talking to my friends?
That's odd, why did you stop talking to them?
Because they are restricting my freedom.
You should be honest with your friends. If they cannot accept you for your opinions you can make new friends.
I'm used to this by now. They will get over it eventually.
People are different, some like being around others often, others need more time to themselves. It sounds like you need to explain to your friends that you need some quiet time to work things out with yourself. If they are good friends, they'll understand!