All autoimmune diseases involve the body attacking good cells. Rheumatoid athritis, MS, lupus, and celiac are included(1). "In some types of hypothyroidism, for example, the body can attack cells that produce thyroid hormone, interfering with the production and function of the hormone."(2) Various foods have immune-boosting nutrients or else autoimmune-inflaming properties - take for example some veggies. Green leafy veggies "are rich in antioxidants and immune-boosting nutrients like vitamin C, vitamin A, and magnesium"; cruciferous veggies have the immune-regulating antioxidant compound glutathione. Nightshades are veggies but they have alkaloids that may increase intestinal inflammation. A study showed that blueberries may be helpful to MS patients(1).
Allergies are inflammatory reactions (please especially refer to Part 1 to see what that means) to substances and foods that wouldn't otherwise require such a response(2), specifically proteins of such foods. As much as 8% of US kids have food allergies, compared to approximately 2% of adults. Food intolerances are less serious and may cause discomfort, but usually affect the digestive tract more than anything(3).
There are upwards of "160 foods that can cause a reaction in sensitive people, [but] there are eight common foods that account for approximately 90% of all food allergy reactions... [which] include milk, eggs, fish, shellfish, tree nuts, peanuts, wheat, and soybeans". Intolerance for lactose, the milk sugar, comes from "reduced production of enzyme lactase after infancy."(3) [Note: Some allergy-causing foods aren't so good for you anyway, or at least when produced wrong. My parents were told I was allergic to milk as a baby, and it turned out the nasty chemicals and hormones in that milk were probably the issue. For some examples, please click the "Not the Same" tag on the blog menu to see articles on some foods that aren't so good for the body.]
References:
1. Younghans, Samantha Faragalli. "The Foods To Eat and Avoid If You Have an Autoimmune Disease:
Defeat Inflammation By Simply Swapping the Worst Foods For Autoimmune Diseases With the Best." Eat This, Not That!. Galvanized Media. 25 Jan. 2020. Web. 21 Jul. 2021. https://www.eatthis.com/autoimmune-disease-diet-foods/.
2. Shomon, Mary. "How the Immune System Works: Its Complex Functions Work to Protect You From Infection." Verywell Health. About, Inc. (Dotdash). 4 Jul. 2020. Web. 21 Jul. 2021. https://www.verywellhealth.com/how-does-the-immune-system-work-3232652.
3. "Questions About Food Allergies? We’ve Got Answers!" Isagenix Health. Isagenix Worldwide, Inc. 26 May 2020. Web. 21 Jul. 2021. https://www.isagenixhealth.net/questions-about-food-allergies-weve-got-answers/.