Only those who obey Christ receive that salvation which God promised to the righteous
A long time ago, a Protestant asked me, “Does the Catholic Church teach that works cause salvation?”
I answered:
No. The causes of salvation are explained in the Council of Trent (Session VI, chapter 7) and boil down to the Mercy of God. I'll quote the pertinent portion below: The causes of this justification are:
the final cause is the glory of God and of Christ and life everlasting;
the efficient cause is the merciful God who washes and sanctifies gratuitously, signing and anointing with the holy Spirit of promise, who is the pledge of our inheritance,
the meritorious cause is His most beloved only begotten, our Lord Jesus Christ, who, when we were enemies, for the exceeding charity wherewith he loved us,[34] merited for us justification by His most holy passion on the wood of the cross and made satisfaction for us to God the Father,
the instrumental cause is the sacrament of baptism, which is the sacrament of faith, without which no man was ever justified finally, (Note: Remember, Baptism is the work of God to which we submit. It is not our work.)
the single formal cause is the justice of God, not that by which He Himself is just, but that by which He makes us just, that, namely, with which we being endowed by Him, are renewed in the spirit of our mind, (EWTN)
In other words, God is the cause of our salvation. No one and nothing else.