This is the old justification by Faith/Works argument. St. Paul in Romans 3:28 For we consider that a person is justified by faith apart from works of the law. Whereas in St. James 2:24 See how a person is justified by works and not by faith alone.
The bottom line is that these statements are compatible. Paul was railing against people who were so immersed in following the Law of Moses that they lost sight of God. People who do works for the sake of works fail.
James was saying that you cannot declare that you believe in God and then do nothing because you have been "saved" by your faith.
James 2:15-16 If a brother or sister has nothing to wear and has no food for the day, and one of you says to them, "Go in peace, keep warm, and eat well," but you do not give them the necessities of the body, what good is it?
Paul and James both support their compatible positions by quoting Abraham.
There is no issue with the position of the Catholic Church on Works vs Faith, IMO. There are issues outside of the Catholic Church usually raised by outsiders obsessed with the Church.
Works Salvation is a Doctrine of Demons and Canon is crystal clear that you are saved alone by the Gift of Grace. The Gospel message couldn't be more clear and more buttressed by dozens of other Scriptural passages. There is NOTHING you can do to win or curry favor for Salvation. Works are evidence of being Saved not the act of being saved, a distinction WITH a difference. You cannot live the perfect life, you cannot give enough of your self to earn it. See the fallacy and logical conundrum you put yourself in when you accept this heresy. You revert back to OT Judaism and keeping the Law and never being sure of your Salvation and enjoying the fruits and joy of being Saved. You walk around unsure, without peace and deluded. Can a gift be conditional? Does G*d work that way? does he give and then put conditions on that gift, of course not and I know you can see that logical contradiction. You have to examine WHY you want this evil doctrine to be true, why you want G*d to notice your good works, really think on that and be honest with yourself.
God even made it even more plain for some of you....
Ephesians 2:8-9 For it is by grace you have been saved, through faithand this is not from yourselves, it is the gift of God 9 not by works, so that no one can boast.
James was saying the proof of the pudding is in the eating. That if we have truly been saved, then the good works will follow. Not that they are necessary for salvation