OP is definitely not alone in this. It feels like I'm constantly trying to avoid "attention capture" when trying to do a task that involves browsing the internet - even going on LinkedIn or StackExchange for a specific purpose can get sidetracked by my eyes wandering to the sidebar or being drawn by updates in the feed. It's scary to realize how little in control I am of my own stream of thought.

I don't know if anyone has a solution that's not straight up quitting the internet cold turkey. My attempt so far has been meditating 50 minutes a day following "The Mind Illuminated" by Culadasa as a progress guide for increasing my mindfulness.

The most recent lesson I've learned is that allowing mind wandering and daydreaming can be a good thing. As a kid I read The Power of Now by Eckhart Tolle, and took away a misconstrued toolkit for dealing with an active mind. The whole book was about emphasizing the importance of being present in the moment, and I tried to carry that out by trying to silence my internal monologue and being frustrated whenever I found my mind thinking about something random and not processing direct conscious experience. That felt horrible and was completely counterproductive to being able to live normally, and now I'm trying to re-establish a relationship with my mind where I can welcome random thoughts while still being able to get things done.

The number of news articles I start reading that interrupt the flow of the article with 'ads' for other articles I could read is driving me bananas.

To say nothing of ads themselves or CTAs or cookie consent banners or...

I'd frequently gripe about how much I felt my attention was fractured as an adult to my grandfather, between taxes or coordinating with service providers or whatever, and his response would frequently be "I'm retired and I can't keep up!"

It does feel that there's pressure in many avenues of life to capture and fracture people's attention.