It's a little more complicated than that, and it's important when people divide themselves and others into two groups: those with strong and those with weak immune systems. For instance when they are talking about COVID-19: 'I have a strong immune system, so I've got nothing to fear. I see no need to get vaccinated.'I respectfully disagree with this portion of your comment. IMHO terrain theory puts too much of the responsibility on the individual, in the sense that it implies that if you get sick, it is your fault. Some people are born with subpar immune systems (the genetic condition SCID comes to mind), and others become immunocompromised from lymphoma or other diseases. It also ignores the fact that new pathogens appear and old ones evolve. However, I would agree that terrain theory can appear reasonable on the surface. Nor do I disagree with the proposition that good nutrition and exercise are important components of good health.
You may have a pretty good immune system until you run into that new infectious disease that your otherwise strong immune system just doesn't handle very well even though it was able to tackle all the others. And unfortunately, that isn't something that you know until you run into it.
There are also immune systems that are so 'strong' that they react to innocuous stuff that would be harmless if it weren't for the (too) strong reaction to something that isn't even a pathogen, but may nevertheless kill them because of the immune response: Anaphylaxis (Wikipedia).
Sometimes COVID-19 may kill you, not because your immune system is too weak, but because its reaction to the infection is too strong:
Cytokine storm (Wikipedia).