In Star Wars Episode 9: The Rise of Skywalker, we got Palpatine rising to power then being defeated by Rey. In the movie, he tells Kylo Ren that he was every voice inside his head (Snoke, Vader, Sidious), so is it possible that the force ghosts Rey heard, were from Palpatine as well? This would cause her to believe she needed to fight back and kill him, and thus, fulfilling his prophecy.
Learn more about your ad choices. Visit megaphone.fm/adchoices