D&D can be a really great game if you have a group of players which is really cohesive in that it gives a lot of room for character development, world building and all of that. Gygax was really interested in the improvisational acting aspects but D&D can get bogged down in the mechanics, statsmaxxing, etc.
On top of players taking it too seriously and the burden that puts on the GM you have the problem that it needed too many dice, too many books (you need the Player’s Guide and the GM guide and a Monster Manual to start and after spending that much money you don’t have have a sample scenario; granted there was a lot of great material for campaign settings that you could buy.). Combat is OK but not great.
There was a 2nd generation of games such as Paranoia, Toon and Call of Cthulhu which set out to address the problems of D&D and all of these come in the form of one book with a scenario which makes it easy to start as a GM.
When my son was younger I would run Paranoia and Toon games for pre-teens and they would have a blast. Games like that can be run on a pickup basis, if a kid comes in late you can give them a preroll and not interrupt the flow at all. One of those kids became a D&D GM later so I’d say those games are a great introduction to the genre and ought to be better known.