Let's just go back to 2014/15. And Look at Intel's Roadmap ( Or Slides ).
2016 - 10nm - CannonLake - First Gen 10nm Process. Industry leading Density.
2017 - 10nm+ - Icelake - New Architecture.
2018 - 10nm++ - TigerLake - Optimisation[1].
2019 - 7nm - Sapphire Rapids [2]
Most people would expect the ETA year to be +1. As 14nm itself was delayed.
TigerLake has around 15%+ IPC. That would put it ahead of Zen 3. The Intel 7nm is roughly between TSMC 5nm and 3nm. Had Intel shipped that in 19/20, along with Sapphire Rapid. AMD wouldn't even lead, they could barely compete.
So to answer your question. It wasn't AMD did some magic. They have been executing, and shipping their product on schedule. ( Although in tech, that in itself is pretty damn impressive ). All while Intel was.... um..... I dont know what they were doing.
10m fiasco has lots of other knock on effect as well. But I guess this is good enough for a ELI5 post :)
[1] This Process - uArch - Optimisation name came in later part. In 2014/15 people were still talking about Tick Tock.
[2] Sapphire Rapid was always a Server Specific design on the roadmap. But things changes bit. Along with Intel's plan of AVX512