I suggest googling “valter longo fasting immune system.” He has done a lot of research into this. I am no doctor, but I believe autophagy, the process of cellular cleaning that happens during clean fasts, will kill old broken cells and replace them with new cells, which could include cells needed for the immune system.
There is a recent scientific paper (link to article, which links to the publication itself) reporting preliminary results from a study of 24-to-72-hour fasts in chemotherapy patients, along with studies on mice. They found that essentially, fasting and refeeding does a “reset” on your immune system. When you fast, your body recycles all the old white blood cells (meaning your immune system is temporarily lowered). When you refeed, it makes a bunch of fresh new white blood cells.
But note that this study did not look at fasting periods less than 24 hours, and in fact they found that 72-hour fasts had an effect in chemo patients, but 24-hour fasts did not. So it still isn’t clear how shorter fasting periods might affect immunity, if at all.
I don’t think IF affects immunity. I was unknowingly an IFer most of my adult life up until covid hit.
I read that strict water fasts lower immunity.
ETA: I’m 50ish. I naturally skipped all food until 4PM (earliest) almost daily since my early 20s with the exception of when I was pregnant and breastfeeding.
I used to get UTI very often. It was a nightmare for me and I got UTI once per month to per two months. After I started IF and reduced my sugar intake, I don’t get UTI anymore. I am not sure if it’s because of IF or sugar but it does make my life easier.