Faith is the root and works are the fruit. Paul in Romans is talking about justification and the grounds of grace and condition of faith. Eph. 2:8-10 shows the relationship between faith and works. Faith is how we receive grace. Salvation is grace through faith apart from works (Jn. 1:12; Jn. 3:16; Rom. 1:16; Eph. 2:8-10; I Jn. 5:11-13; Titus 3:5; Rom. 4-5). When Jesus was asked in John about the workS needed for eternal life, He said the worK of God was to believe.
James is talking about practical Christian living post-conversion. He was responding to an objection and contrasted true faith (trust in Christ that bears fruit as He lives in us) with devil's 'faith' that is mere mental assent and dead. True faith normatively produces the fruit of works, but works cannot get us one inch closer to a holy God's standard of perfection. So, Paul deals with justification and James deals with the nature of faith and practical living. Paul was not anti-works and James was not anti-faith. Both knew that salvation was grace/faith alone. Cults like JWs and Mormons have faith plus works, the Galatian heresy that Paul said leads to anathema/eternally condemned (Judaizer heresy).
All the WT works are useless and add nothing to Christ's shed blood. Christians know they have eternal life now based on Christ's work for us. Cultists never have assurance and will never earn their way to God. An athlete and a drunk will still fall into the canyon (chasm between holy God and sinful man only bridged by the cross/not torture stake nonsense) despite one doing better than the other. The thief on the cross did no works and was saved through simple trust in Christ.