HI, thanks for using healthcare magic
If the medication for congestion helped to relieve your pain then it is likely due to congestion of the sinuses.
This is one of the more common reasons for headache. Other common causes are
migraine,
tension headache,
cluster headache, trauma.
Though persons may worry about headache being related to a mass in the brain, this is a rare cause.
Sinus congestion is most often related to allergies though acute congestion can occur with coughs/colds.
Allergies can occur with foods, dust, drinks, pollen, animal dander, medications, chemicals etc
If you can determine what worsens your symptoms and reduce your exposure to it, this would help
You should continue the congestion medication along with
anti histamines and
topical steroid nasal sprays such as nasonex, nasocort, flonase etc
I hope this helps