The Mandalorian season 2 finale sees the arrival of all-powerful Jedi Luke Skywalker, and this fits with both The Last Jedi and The Rise of Skywalker.
Luke Skywalker arrived in The Mandalorian season 2 finale, "Chapter 16: The Rescue," to save Grogu and take him for Jedi training, and the all-powerful version of the Jedi seen here honors both Star Wars: The Last Jedi and Star Wars: The Rise of Skywalker. The main hero of the original Star Wars trilogy, Luke Skywalker became a key figure in the divisions over Disney's sequel trilogy, with controversial characterization in both The Last Jedi and The Rise of Skywalker.
Following on from Star Wars: The Force Awakens, where Luke was found on an island, The Last Jedi introduced a version nobody expected. Gone was the idealistic hero, the hopeful savior of the galaxy, and the great Jedi Master, instead replaced by a sad hermit, cut off from the Force and filled with regret. He'd turned on his student, and left the Order (and everyone else) behind. To some, this led to a beautiful, nuanced portrayal of the character that ultimately got to the heart of Star Wars, and for others it was a betrayal of everything Luke had stood for and represented. In The Rise of Skywalker, Luke returned as a Force Ghost, showing off more incredible powers, giving Rey a lightsaber, and telling her to kill Palpatine. For many who didn't like The last Jedi, this was seen as a course-correct; for those who did, it was itself a betrayal.
It's easy to say that the version of Luke Skywalker (again played by Mark Hamill, with digital assistance) in The Mandalorian fits more with The Rise of Skywalker's supposed "correction" of the character, an argument that has been made on social media since his debut. After all, this is the ideal version of Luke - the one fans have always wanted to see on screen. An astonishingly powerful Jedi who cuts through and throws around Dark Troopers like they are nothing, but matches his incredible Force power and lightsaber skill with the wisdom of a true Jedi Master. It could be seen as the "real" Luke, and in that sense, it does honor what The Rise of Skywalker was doing in trying to get back to the version of Luke some fans believed in, and who was ostensibly absent from The Last Jedi.
However, The Mandalorian's Luke Skywalker doesn't actually go against what's in The Last Jedi either, but manages to honor that portrayal as well. It is easy to see this as the beginning of the arc that leads Luke to this point: the optimistic (yet still somewhat wary) Jedi who is looking to rebuild the Order, who will then experience his greatest ever failure, causing him to shut himself off from the Force. It doesn't take away or retcon his journey in The Last Jedi so much as it does add to it, making his fall even greater and his words of giving his life to protect Grogu meaning his failing of Ben Solo (even though Palpatine was behind it) seems even more tragic.
At the same time, though, the all-mighty powers displayed by Luke in The Mandalorian season 2, episode 8 fit even better with The Last Jedi than they do The Rise of Skywalker. In the former, Luke may not have wielded a lightsaber in a way any expected, though he did face down the First Order with a "laser sword" in a sense, but he showed with is arguably the single greatest display of Force power in any Star Wars movie with his projection across the galaxy. If celebrating the insanely powerful Luke in The Mandalorian, then it must be noted he has that same power level in The Last Jedi, and then continues to be powerful in The Rise of Skywalker even as a Force Ghost.
The Mandalorian is somewhat unique among Disney's live-action Star Wars properties in that it is not controversial or divisive, but instead almost universally loved by the fandom. That perhaps makes it the perfect place to introduce Luke Skywalker again and tackle issues with the sequel trilogy. The Mandalorian brings balance to the Star Wars fandom, showing that it's possible to honor what is in Star Wars: The Last Jedi and Star Wars: The Rise of Skywalker, without the need to retcon, change, or dismiss either one. If Luke returns in The Mandalorian season 3, it could even further hammer home this message. Maybe this is the way.