I’m always sceptical of stories about foods that boost the immune system. They often appear on health websites without any link to the source or a description of the study. While a balanced diet is important to keeping us healthy and our immune systems strong I can’t say for certain if any foods actually help the immune system become stronger beyond having a placebo effect.
It has been shown that patients who are chronically overweight have poorly functioning immune systems later on in life and are less effective at responding to viral infections and cancer. This same trend has been seen in people who smoke. We’re still finding out exactly why this happens but early signs suggest that being overweight for such a long time puts our bodies under a lot of stress and that weakens the immune system.
To go back to your question about immune system boosting foods. There are parts of plants that have been known to boost the immune system. We don’t eat these plants but we inject them in vaccines and they make the vaccine work more effectively. In some cases parts of seaweed have been even used to try make better cancer treatments.