Dennis Prager often says that leftism is a religion. That is a sloppy use of language. Leftism is an anti-religious political ideology that functions in the lives of its adherents much like religions function in the lives of their adherents. To call leftism a religion only sires confusion. It is enough to say it is like a religion in certain key respects.
Or you could say that leftism is an ersatz religion for leftists. 'Ersatz' here functions as an alienans adjective. A substitute for religion is not a religion.
It is also important to observe that conservatism for irreligious conservatives does not typically function as an ersatz religion for them. That would make a nice separate post.
Resemblance is not identity. Language matters.