Hi Gil, if you have not done so already, I would check reputable websites like WebMD, Mayo Clinic to make sure your headaches are definitely migraines. Sometimes people use the term to describe bad headaches generally. Checking with a neurologist would be key.
I have come across a good migraine medication: generic name Sumatriptan, common brand name Imitrex. This is not to say you can just pop a pill: oftentimes life events can trigger migraines in the first place. And you can get nasty rebound headaches if you overuse. There are good reasons you can get it only with a prescription.
For me, it started with severe childhood trauma. Resolved that, but afterwards just worrying about whether I would get a headache could trigger one. Later I discovered that my neck posture is not so good, which leads to muscle strain, which hurts a lot more when it ascends to my head. Sometimes the med. does not work, usually meaning it is not a migraine. Still hurts, though. Just examples of how headaches start from even innocuous things.
As for scrolling the phone, I am going to guess that you get some relief realizing e.g. that you have answered all truly important texts and there is no traumatic news story in the last two hours. But that long term, the stimulation even if enjoyable gets in the way of true relaxation. Maybe the way a shot of whiskey can be relaxing short term, not so good for sleep.