Nouns ending in -on are usually masculine, but la religion is feminine.
Religion is one of the rare exceptions: learn it as it is.
Nous devons séparer la politique de la religion.
We must separate politics from religion.
La superstition est la religion des esprits faibles.
Superstition is the religion of feeble minds.
Les spationautes n'étaient pas dépourvus de religion.
Space explorers were not without religion.
FrenchTextbook teaches rules like this, in a full beginner course.
162 lessons, 4,000+ exercises, and 6+ hours of audio.
Try the first lesson free