You need oxygen to live. If you can't breathe, your body will expire. It is the same with faith. If you do not exhibit the fruit of repentance, aka "works," your faith is impotent and dead.
The idea of "works" being vital to your faith has been vilified by some. "It's all about grace, not works. You're mixing law and grace." This is virtue signaling. However, James deftly balances the scale.
It is healthy to take inventory of the fruit of your faith. “Is there fruit? What kind and quality is the fruit? Will it live on after you're gone, i.e., will it produce a legacy?” Your fruit will reveal and prove your faith. - Pastor Jimmy