All the First Order has to do was continue marching towards the old Rebel base and destroying it and everyone inside with that cannon and all of the artillery they brought with him. They were minutes away from doing so.
It was Kylo who stopped them from moving in, because he spotted Luke. He order them to fire everything they had on him, and nothing happened to him. They all saw this.
And while Kylo was busy screwing around trying to defeat Luke, the entire Resistance escaped! Luke took off as soon as they were clear. The First Order had victory in their hands and it slipped away because Kylo Ren fell for it. They understood Luke was just distracting him and it worked. And again, watch the way Hux glares at him in that empty Rebel base. The First Order hates Kylo Ren.
And that is not downplaying Lukes role. He showed what was possibly the most awesome display of the Force that weve seen in 40 years of Star Wars movies. It was everything that we learned about the Force from ESB: Luke showed up on Dagobah, looking for a great warrior and was taught that wars not make one great, luminous beings we are, not this crude matter, and that a Jedi uses the Force for knowledge and defense, never for attack. It was all there. It was everything we ever learned about the power of the Force.
Luke faced his own demons, helped the Resistance escape, and displayed a show of the Force that lit a spark that inspired everyone from the Rebellion to slave children on Crait.
Everything Kylo did on Crait was wrong. The Rebellion was reborn, the war was just beginning, and Luke is not the last Jedi.