Warning: Last Jedi and Rise of Skywalker Spoilers Ahead!
Ben Solo never stood a chance. Burdened with the weight of family history on both sides of the Force, a lonely Ben Solo/Kylo Ren sought to break free and stand on his own by outdoing them all and ruling the galaxy. But as Kylo Ren's fate in Rise of Skywalker shows, sometimes you really can't escape becoming your family.
Just as his grandfather did before him, Kylo Ren ultimately turned towards the Light Side of the force at the end of his life, sacrificing and redeeming himself to save Rey. Unlike Vader, however, it wasn't a sudden shift, but a deliberate choice decided before he went to confront Palpatine.
After the devastating betrayal Kylo felt when then-mentor Luke sought to keep his powers from the Dark Side by killing him, he became exactly what Luke had feared. By the time of The Force Awakens, he'd become obsessed with surpassing his grandfather Darth Vader. Kylo inherited Anakin's anger issues, and his tendency to slaughter entire groups of people in blinded rage, but he seemed to also inherit his capacity to care deeply to the point of obsession. Ironically, while that obsession's what turned Anakin to the Dark Side to save Padme, it's what made Kylo become obsessed with Rey, and, eventually, drove him into the light.
In Rise of the Skywalker, Kylo's determination to bring Rey over to the Dark Side leads to a confrontation on the remains of the Death Star. It's clear he doesn't really want to kill Rey, but he wold have, were it not for the voice of his mother, Leia, who uses her last ounce of strength to reach out to him. His distraction leads to mortal injury, but Rey chooses to use Force healing to save him, and tells him she wanted to take not his hand, but Ben's.
The combination of both women giving up their own energy to help him seems to cause a seismic shift. He even throws his lightsaber into the ocean. Kylo Ren is dead, but Ben Solo survives.
Later, when he joins Rey on Exogol, he still wants to destroy Palpatine, but now it's to help Rey, not to claim the Sith throne. Unfortunately for both kids, the older generation has the upper hand and siphons power from them for their own gain (kindly insert your own "ok Boomer" joke about generational exploitation here). Ben is blasted into a pit, leaving Rey to struggle on her own — she ultimately defeats Palpatine, but at the cost of her own life. With his last ounce of strength, Ben returns her earlier favor, healing her. And, Reylo fans, they kiss.
Despite Ben's redemption, his past evils come at a cost, and he dies after saving Rey. When he dies, however, his body immediately disappears — a sign he's become a Force ghost. Much like his grandfather Vader, whose own Force ghost appeared as his younger self before the corrupting influence of the Dark Side, Ben Solo ultimately chose to protect those he cared about, rejecting the Dark Side's embrace of hate. Some family legacies are apparently hard to shake.