Thirty years earlier people were also "always at home". Watching TV, or playing console games…
The big difference was: At least the youth was at home together with others doing so. You went over to your neighbor to watch some TV show for example.
What changed quite lately are indeed the always online smartphones. You don't need to go to your neighbor, even if you want to "do something together" (of course online, like everything nowadays).
Also people don't even call each other. The default is chat, or very often voice messages. But no real talking.
So no, media and electronics aren't the main driver here. It's the always online devices everybody uses everywhere the whole time. Human minds likely aren't constructed to be always connected (or one could argue, actually disconnected) in such a way.
It's not primary the quantity, it's the quality of media consumption that significantly changed. Also the media is the first time completely interactive and personalized. Compare to for example TV (which was back than "the devil who destroys the morale of our youth" according to some elder people). You didn't get targeted personalized ads the whole day on your TV…
The psychological manipulation that the pre-smartphone media could possibly exercise on individuals was much more constrained compared to what's possible (and actually gets executed) today. Smartphone apps are a great example as they're now mostly constructed to induced addiction (the companies selling ads call it "engagement").