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 was a child too many years ago, I was dimly aware that my dad played something cool involving dragons. I had no idea what it was. In retrospect, I think him and his friends just got stoned and looked at the cool pictures and figures.
My memory is a little hazy on the exact sequence that followed, but I got some DND video games. Eye of the Beholder and Baldur’s Gate. I didn’t know how any of the rules worked (pre-3e is wacky) but I was super into it.
I went to a very left-wing church (UU) and actually got a group to play together through that. It was about as bad as a pack of 13-year-olds is expected to be. To the two adults who volunteered to run this for us, Vera and Mindy, I’m so sorry.
I also remember some random dude in a local-ish game shop who took about 15 minutes to talk to me, an extremely excited 13-year-old, about how D&D worked and while you can do anything in it, not everything is a good idea. Thanks, random dude.
But the TLDR is: Vague word of mouth -> video games -> actual play.