It is very very less likely a brain cancer
. But more detail about your headache is required. It appears most likely migraine
headache. There is specific treatment for it, which can be taken under guidance of a neurologist
so that the can be completely controlled. You also need some lifestyle modification.