"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.
The very "best" part of my journey was seeing a migraine specialist very early on. I told him that I thought maybe caffeine had something to do with it. He brusquely told me that caffeine had nothing to do with it. Twenty years later, I went to the same guy, because I had learned some new things. Again, I mentioned how much caffeine I was drinking, and he cut me off, and, again, brusquely told me that this was my whole problem. When confronted with the contradiction, he mumbled some things, and I got out of there. I was peeved. He retired not long after.
Another, very-thoughtful doctor I saw, explained that the East Coast / West Coast research hospitals are actually divided on the issue of how much caffeine contributes to migraines, so it's not like it's exactly clear.
In my experience, I can confidently say that caffeine withdrawal headaches and migraines are 2 different animals, but they can present with the same intensity of pain at times, so it is confusing.