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!”
During middle school a friend of mine introduced me to Pathfinder 1e. After my family found out they claimed I was practicing Satanism and had various church members visit me to dissuade me from “letting Satan into my heart”.
It wasn’t until I moved out and headed to college that I got into 5e. One of my freshman classes I met a 5e “Forever DM” and we started gathering a group that played off/on all throughout college. After college most of us stayed in the Seattle area, and I became a Pathfinder 2e DM this year. Currently running a game with some of my old college group as well as colleges who were interested in TTRPGs.