It's pretty much a down to a mix of factors.
More players now choosing to represent Canada instead of their ancestral countries (where they were born, where their parents/grandparents were born). This was a huge issue in the past that stiffled development. Once a few young players with potential (ex. Davies, David, Eustaquio, etc) began to represent Canada, it sort of became a feedback loop to the point where now Canada is the #1 choice for many potential dual-nationals.
Better coaching. In the 2017 Gold Cup it was Zambrano who gave Davies his debut, then later on Herdman got hired onto the program and really helped develop the tram and expand the scouting system to make sure many potential dual-nationals chose to represent Canada, and be proud of playing for the country. The morale boost that Herdman brought to the team can not be understated. For generations, the team lacked belief and there was too much of a "not care" attitude towards playing for the country, where many players would outright reject call-ups or when on the team, their egos would get in the way. Herdman instilled a complete overhaul of this long persistent issue, to the point where some players said they would run through a brick wall for him.
Better players and depth in quality. Canada has had several great players in the past, playing in the top leagues, however even when it may have reached that tipping point, the underlying issues on the mental side would hold us back. Today, there's a "golden generation" of sorts. And success begets success. Think back to the dual-national issue from before -- it would consistently hamper the team. Canada were unfortunately not able to build on the successes of winning the Gold Cup in 1985 and 2000. While this current team has yet to win a trophy, the quality in depth and morale is unlike anything we've seen before.
New league. The CPL (Canadian Premier League) began in 2019 and is now a great opportunity and step for young players to take after high school to go pro. We did not have a Canadian league before and this has really helped with player development and better scouting. The feeder leagues (Ontario Premier League, Quebec Premier League, and now the BC league) are helping too.
All this has happened despite the dumpster fire the CSA (Canada Soccer Association) still finds itself in. It's quite remarkable, and with a better coach at the helm now (Jesse Marsch), I'm quite confident Canada can finally break the long trophy drought and win the Gold Cup next summer, especially following the positive showing at the Copa America.