I don’t think there is a contradiction between the two statements. People hold religious views as individuals, ie on a personal basis. That so many people do literally “believe” without reference to the facts in one sort of religion or another is a social matter, a social problem.
Socialists oppose it because all religions are wrong in their assumptions just as, for instance, reformism and nationalism are and this impedes people coming to realise what they need to do to make this life (the only one we have) as good as possible.