Some 20+ years ago, my neurologist had me keep a food diary. I had to write down everything I put in my mouth...water, a breath mint, gum, M&M's, everything.
In six-weeks, I learned that some things I liked (and loved) to eat were triggers for a migraine. Milk chocolate, hoop cheese, flavored potato chips, salad dressings, soft drinks, etc..
I had to start reading labels on everything and to eliminate everything with MSG. I also had to check the sodium and gluten content and anything with dye as well.
No more milk chocolate (I've always liked dark chocolate more), hoop cheese, doritos or any kind of flavored potato chips and even store bought dip, as well as any dry mixes and spices.
My ex-husband used to drink a lot of Gatorade and Mountain Dew. I remember he got a diet Mountain Dew once & didn't realize it until he got home so he put it in the fridge for me. If I eat or drink something that's gonna give me a headache, I know it within about 20 minutes or so. He poured that Mountain Dew down the drain after we got home from the emergency room one night.
I'm in my 50's so when Lay's came out with their natural brand of chips...I was like a little kid in a candy store!! Then the candy companies started making stuff with dark chocolate so, I was able to eat Reese's, M&M's and a Milky Way again.
With so many new companies and new things on the shelves these days, I stil read labels on things I buy. Sometimes it won't have MSG or anything else I know I need to avoid but it might trigger a migraine. I also know that everybody's different and some things that trigger mine don't necessarily trigger somebody else's.