Earlier quoted context omitted.
As someone who has suffered from migraines for 30 years, I can tell you that everyone just LOVES to tell you ALL the things you're doing wrong to cause them. As though I haven't been to every specialist I can find, and have tried -- literally -- every treatment known to man (except botox, yet).
Oh man, in my experience, migraines in particular are the worst for this because a ton of the common "justs" are actively conflicting "Just cut out caffeine/just try some caffeine when you feel one coming on!" "Just get more exercise/just make sure you're not exerting yourself too hard!" "Just get more sun/just make sure you're wearing sunglasses when you go out!"
Still, 100% true that people are usually unhelpful with their flippant medical advice.