You can't be fired simply for belonging to a religion.
However, belonging to a religion doesn't legally excuse your other actions such as harassing others based on their religion/sex/whatever.
So, you can belong to the Church of Satan, and even tell people that you belong to it -- that's your business. But you can't harass Christians for being Christian. That's their business.
Similarly, you can believe there are only two genders and those who transgress those boundaries are wrong. That's your business. But you can't harass coworkers based on those beliefs. That's their business.