Usually, if a consonnant is alone at the end of a word, there is a 50% they are not pronounced. We think it's the following vowel that makes them sound. For example : Stressant (pronounced stress san) and
Stressante (pronounced stress santt)
But what makes it difficult is, there is a large number of exceptions. For example, usually "s" are not pronounced, but there are words like "cassis" where you do pronounce it. I think this might be because of borrowed word, some kept the original sound even though it's not logic in a French perspective. You just have to learn them as you go because some don't make sence even when you try to get it. (for example, you don't pronounce the "c" in "banc" but you do in "bac". You can pronounce the "t" in "but" but you don't have to, it`s a regional choice). So don't over think it, see it as a spy would : a challenge.