Are you good about figuring out what's causing your headaches?

I have sooo many random headaches and migraines and I'm so tired of never being able to figure out why to take right medicine!