We now know that sugar compromises the immune system. Sugar consumption causes a huge range of health issues, which we were taught were caused by eating too much meat and fat. The truth is now out, but it is not widely promoted for a variety of reasons. It is up to you to do your own research and understand and "unteach" yourself so that you can look forward to a healthier lifestyle.
Unhealthy issues such as weight gain, diabetes, inflammatory issues, and more can be reversed by eating real food. Once you drop the unhealthy carbohydrates from your diet and eat real food, you will feel the difference within days. Don't be afraid to try it out.
Here's a video that I recommend watching. It's packed with good information that explains how you can improve your immune system and reverse most health issues.