Current research indicates that lifestyle and environmental factors predominantly shape human immunity, while genetic factors influence individual responses to specific pathogens.
Research suggests immunity is mostly determined by lifestyle and environmental factors, not genes, but that genes might influence how an induvidual responds to a specific pathogen

The Influence of Genetic and Environmental Factors and Their Interactions on Immune Response to Helminth Infections - PMC
Source: ncbi.nlm.nih.gov
Key Evidence
Studies show non-heritable influences such as pathogens and nutrition overshadow most heritable factors in shaping immunity.
pmc.ncbi.nlm.nih.govpmc.ncbi.nlm.nih.govVariation in the human immune system is largely driven by non-heritable...
Environment is identified as the primary driver of immune variation over genetics in large cohort analyses.
med.stanford.edumed.stanford.eduEnvironment, not genes, plays starring role in human immune variation, study...
Genetic factors influence individual susceptibility and response variability to specific pathogens.
onlinelibrary.wiley.comonlinelibrary.wiley.comShaping immunity: The influence of natural selection on population immune...
What the Evidence Shows
Multiple studies have demonstrated that the variation in human immune responses is largely driven by non-heritable factors such as environmental exposures, nutrition, infections, and lifestyle. For example, research on helminth infections shows that environmental context and host genetics interact, but environmental influences often predominate in determining immune outcomes.ncbi.nlm.nih.govncbi.nlm.nih.govThe Influence of Genetic and Environmental Factors and Their Interactions on...
frontiersin.orgfrontiersin.orgFrontiers A landmark study from Stanford highlights that environment plays a starring role in immune variation compared to genes.
med.stanford.edumed.stanford.eduEnvironment, not genes, plays starring role in human immune variation, study...
Additionally, twin studies reveal that innate and adaptive immune traits are differentially affected by genetics and environment, with many immune parameters more influenced by environmental factors.nature.comnature.comInnate and adaptive immune traits are differentially affected by genetic and... However, genetic variation still plays a critical role in modulating how individuals respond to specific pathogens or immune challenges, contributing to population-level diversity in susceptibility and immune function.
onlinelibrary.wiley.comonlinelibrary.wiley.comShaping immunity: The influence of natural selection on population immune...
Early life environmental exposures also shape immune memory and responses significantly.pmc.ncbi.nlm.nih.govpmc.ncbi.nlm.nih.govThe Role of Environmental Factors in Modulating Immune Responses in Early Life Overall, the statement accurately reflects the consensus that immunity is mostly shaped by lifestyle and environment but modulated by genetic predispositions.