This article contains spoilers for Star Wars: The Rise of Skywalker. When the first trailer for The Rise of Skywalker was released, it seemed clear that not long after killing off Supreme Leader Snoke, the Resistance would have to face off against an even bigger force of evil in the final installment of the trilogy. However, The Rise of Skywalker explained Snoke's connection to Emperor Palpatine early on in the film, revealing that the mysterious leader of the First Order was just a pawn in Palpatine's plan to take over the galaxy once more.
Star Wars fans first met Andy Serkis' menacing alien leader in The Force Awakens as the head of the First Order, who commands Hux (Domhnall Gleeson) and Kylo Ren (Adam Driver) and uses the Dark Side of the Force to further corrupt the latter and draw him further away from his parents. However, in The Last Jedi, the tension between Snoke and Kylo comes to a head after the Supreme Leader has captured Rey (Daisy Ridley), and Kylo uses the Force to turn on her lightsaber and slice the menacing alien in half. From there, Kylo takes on the role of Supreme Leader, appearing to have killed Snoke in order to break away from his influence and take control of the First Order.
But early on in Episode IX, a revived Palpatine (Ian McDiarmid) reveals that Snoke was simply a puppet, and that he was using the former Supreme Leader to carry out his plan while he hid out and rebuilt his strength and followers. The big twist reveals that Snoke was never the villain that the first two movies made him out to be — he was simply a pawn in Palpatine's grand vision of rebuilding the Empire.
Palpatine states at one point in the movie that he wanted both Kylo and Rey in order to restore himself to his former glory — Rey, being his granddaughter, and Kylo, being the son of a Skywalker, both posses an extraordinary connection to the Force — and so he needed to find some way to corrupt Kylo and turn him to the Dark Side.
Thus, he became "every voice in [his] head," from Darth Vader to Supreme Leader Snoke, who tempted and coerced Kylo to turn against his parents and become a member of the First Order. In addition, Snoke himself revealed in The Last Jedi, he created the connection between Rey and Kylo, which (along with her Palpatine heritage) caused a conflict within her that made her tempted to join Kylo on the Dark Side.
Palpatine's plan to have Snoke become the Supreme Leader of the First Order also seemed to be designed to draw the Resistance's attention away from his resurrection. After all, if they were busy fighting this new, growing evil, they would be less likely to pay attention to the fact that one of the most powerful Sith Lords of all time wasn't really dead. In addition, if Kylo is a member of the First Order, it would be easier for Palpatine to manipulate him, since he is already inside of his head and understands what Kylo wants to hear.
As menacing as Palpatine's return and his Final Order fleet is, perhaps the most unsettling reveal of all is the shot of Snoke in some kind of tank on Exegol, implying that he either was cloned by the Final Order, or was, in fact, a clone all along. Either way, Rise of the Skywalker made it clear that Snoke was just a piece of Palpatine's grand plan to return to power, and that even though he was killed by Kylo in The Last Jedi, he played his role perfectly.