Up until 4e, DnD (and TTRPGs in general) were pretty much only spread through the game itself. You either knew someone who played, or maybe you heard about it on the internet and you were interested so you sought out a local game shop, something like that. Regardless, your first experiences with what DnD was like (ignoring fear-mongering movies and other negative media) was likely to be from playing it.
That seems to have changed with 5e. DnD media is bigger than it’s ever been. Actual play podcasts and shows are everywhere. Speaking personally, though I had been in lots of LGS from playing a ton of MtG growing up, my first direct exposure to DnD was finding The Adventure Zone (way back when it first started as a “one-off” side thing from MBMBAM). From there, I learned about Critical Role, and it only took a few watches of that before I resolved to actually find a group to play with.
How about everyone else? Did you get into the game because a friend invited you to play, or did you get hooked on some DnD show and decide “I want to do that, too!”
…when i moved to the `states in `80, i overheard all the kids at the bike racks after school talking about their ‘armor class’ along with various swords and figured huh, i guess fencing or kendo must be the popular sport for kids here in the `states, like soccer clubs back in ponce…later that fall, thanksgiving, a couple of older cousins introduced me to D+D at our grandparents’ house and i suddenly made sense of what all the other kids were discussing back at school, after which i started playing in earnest in `81, but it was just that: a strange tabletop game with obscure rules, exotic dice, and ambiguous objectives…
…merchandising really kicked in the following year with action figures in `82, a cartoon in `83, and somewhere along the way i could start finding game material at waldenbooks rather than the back corner of our seedy local hobby shop populated by middle-aged scale-model enthusiasts…by `84, D+D was everywhere: local libraries maintained subscriptions to dragon magazine, dragonlance novels took the fantasy genre by storm, and you could find notebooks, stickers, and other branded paraphernalia at any local drugstore…
…so for me, the game came first and media second, but the mid-eighties media presence felt every bit as prominent or perhaps even moreso than today; it was absolutely dominant in way that only something like fortnite or lego feel right now…