For every verse you quote saying works don’t matter, there is another contradictory one saying they do.
“So faith by itself, if it has no works, is dead.” (James 2:17).
“You see that a man is justified by works and not by faith alone.” (James 2:24).
“What does it profit, my brethren, if a man says that he has faith but has not works? Can his faith save him?” (James 2:14).
“For just as a body without a spirit is dead, so also faith without works is dead.” (James 2:26).
Then said they unto him, What shall we do, that we might work the works of God? Jesus answered and said unto them, This is the work of God, that ye believe on him whom he hath sent. John 6:28-29
So I've heard...
Jesus answered, The work of God is this: to believe in the one he has sent.