Same thing happened to me. I was eating bananas, beef, coffee, etc. then I got some sort of viral infection. My thyroid became inflamed for a couple months. No doctor was able to find anything wrong with me.
Little did I know, having postviral sequelae causes my immune system to start hating many things I used to eat. A food blood sensitive test showed that bananas, beef, coffee were what set my immune system off the most.
I was told it was gut permeability causing food particles to leak into the blood stream causing the immune response. So the fix has been to stop eating those, let the gut heal, and over time I've been able to eat those foods in moderation years later.