I had not thought about this until seeing this. I realized that some of the great opening numbers are from the past 20 years. If you think about some of the great musicals, they did not have big opening numbers, e.g., South Pacific, MFL, Dolly, Mame, Man of La Mancha, Phantom, Gypsy, Evita (clearly effective,but...), The Music Man. (Clearly there are also Tradition, Cabaret and Company; and special mention to the opening of Follies, which may not be a number per se but is still amazing when well done).
Re the past 20 years, I agree with a lot of the posters, but I would rank as follows:
1. Ragtime: for my money, maybe the greatest opening number ever. It accomplished so much story telling, yet entertained the hell out of you.
2. The Lion King: IMO it is major downhill from there, but the opening number, which is really just a procession, is stunning. It is the reason The LionKing remains the hit it is today.
3. Hamilton: I don't know how much this has to do with the electricity in the air, but I think the opening number sets the tone for the entire show.
4. Titanic: the chorals are so great,and it does an incredible job of introducing all of the characters. I still get goosebumps when I occasionally listen to it.
5. Come From Away. That show would not be the hit it is without that opening number. It tells you that it is going to be okay to be entertained by the show, and that you needn't worry about planes falling out of the sky.
Honorable Mention: The King of Broadway. IMO The Producers gets bad-mouthed a lot on this board. It is to me still the most entertaining show in that time period, and the opening number does a great job of setting the scene, introducing us to Max Bialystyock. Urinetown, for its pure audacity.