Mark Hamill reprised his role as Luke Skywalker in The Mandalorian season 2, episode 8 to save the day, cutting through the Dark Troopers who had Din Djarin et al facing insurmountable odds, and taking Grogu with him to be trained as a Jedi. The moment was a thrill for Star Wars fans, but has been slightly marred by debate over whether or not Hamill should've been used or if Luke should have been recast (with Sebastian Stan a popular choice) due to the issues with the "uncanny valley" aspect of digital de-aging technology.
Disney has long been pushing its de-aging tech through both of its flagship studios, Marvel and Lucasfilm, with the latter's Industrial Light & Magic (ILM) animation and VFX studio leading the way in developing the technology, which has been seen in the likes of Rogue One: A Star Wars Story, Captain Marvel, and even non-Disney properties such as The Irishman. The Mandalorian is just the latest example, with Hamill's face and voice being put onto the body of actor Max Lloyd Jones who, at 40-years Hamill's junior (29 to 69) is better placed to portray the 28-year-old Luke in The Mandalorian.
It's true that the look of Princess Leia in Rogue One. Since Hamill is Luke Skywalker, then using him, even with CGI, rather than a different actor only heightens this, whereas a new cast member wouldn't have carried with them the legacy of the character that Hamill brings.
The Mandalorian also stays true to Luke's character. That's the case for the action sequences, where the CGI and casting isn't an issue at all because the hood covers the stunt double's face, making it even easier - and since the hood is quite effective in adding to the mood of it, then it further reduced the need for any big recasting. And after those thrills and the excitement of Luke's reveal, then him being the one who turns up to rescue Grogu and take him to be a Jedi again fits perfectly with who he is as a person, and where The Mandalorian's journey has been headed, and similarly it's having Hamill back that adds to the depth of that because he means so much in the role.
As it stands, there's no confirmation of what role Luke will play in Luke Skywalker in The Mandalorian season 2 finale and so, for all the talk of CGI, it was easily the right choice.