Star Wars: The Rise of Skywalker saw Ben Solo give his life to help Rey defeat Palpatine and the Final Order, but 18 years before that, the Legends continuity had already handled the death of Han and Leia's son more effectively. While they only had one child in Star Wars canon, they had three children in the old Expanded Universe (now branded non-canon, or "Legends"). One of these sons, though very different from Kylo Ren in canon, met his end in a similar, heroic manner. This sacrifice would leave a lasting impact on the Solos, the Skywalkers, and the entire Star Wars Legends timeline from that point on.
https://screenrant.com/star-wars-legends-han-leia-son-death-rise-skywalker/