The legend of the Kessel Run is a popular component of Han Solo and Star Wars history in general. Much like asking who shot first (Han did, as Solo proves), the Kessel Run has been a topic of debate for over 40 years now. When Lucasfilm first announced that Solo: A Star Wars Story was going to be a real movie, nearly all hardcore fans knew that the Kessel Run was going to have to be addressed. When it came time to write that scene, screenwriter Jonathan Kasdan admits that he did not want to include it, but his father and co-screenwriter, Lawrence Kasdan, convinced him that they had to do it.
Han Solo famously bragged to Obi-Wan Kenobi and Luke Skywalker that the Millennium Falcon did the Kessel Run in 12 parsecs in A New Hope and Solo finally addressed how the trashy looking ship was able to accomplish such a feat. In terms of storytelling, it's very well done and is the centerpiece to Solo, but it seemed too daunting to Jonathan Kasdan before they started to write it. He explains.
"When he said that, I said Really, do we have to? Because it's such a complicated bit of logic, and solving it was really challenging. We spent a lot of time arguing about how it could work [and how] the language of what (Han) says in that one scene shot years ago that you know George [Lucas] was just sitting there thinking, This sounds cool: I did it in 12 parsecs --- could be flushed out into a fully-fledged coherent sequence that was satisfying and fun. I'm thrilled with how it came out, but it was one of the daunting elements of this always."
Solo is chalk full of callbacks to the original trilogy as well as the prequels and beyond, so Jonathan and Lawrence Kasdan had to really tread around the legacy of the Star Wars universe softly, to not disturb anything that could easily be called out by the hardcore devotees. Meticulous research had to be conducted in order to string everything together in a linear fashion and then there were those Easter Eggs that are really obscure and are now officially part of the Star Wars canon. Everything works, but Solo has been criticized for having a few too many callbacks.
The Kessel Run is now shown for the first time in Star Wars history and it's written and performed very well. Donald Glover's wounded and irritated Lando Calrissian allows Alden Ehrenreich's young Han Solo to pilot his prized Millennium Falcon to get them out of Kessel and to safety. It's just as white knuckle for Lando as it is for fans sitting in the theater watching it. Though Jonathan Kasdan was apprehensive at first, everything came together and it looks awesome. You can read the rest of the interview with Jonathan Kasdan and his reluctance to initially insert the Kessel Run into Solo over at CinemaBlend.