Religion and salvation are two vastly different things.
Have to disagree just a bit on that harsh of a statement. There are two types of religion manrntioned in Scripture. One certainly meets the criteria for what you piece is trying to say. The other is salvific religion.
James 1:27 Religion that is pure and undefiled before God, the Father, is this: to visit orphans and widows in their affliction, and to keep oneself unstained from the world.
Visiting widows and orphans? Sounds like “works” to me. Unnecessary, right?
I would disagree. The verse in James says nothing about salvation. It simply says that God accepts that kind of religion. Thinking that doing those somehow obtains or deserves salvation is contrary to what scripture teaches.