What happens after death has always been a major plot point in Star Wars, with the Jedi in particular having a pretty extensive understanding of what exactly happens when they shuffle off their galactic mortal coil.
The Phantom Menace's Qui-Gon Jinn was famous for his deep understanding of the light side of the Force, so much so that many considered him more capable in that area than even Yoda. It was thanks to that knowledge that he was able to become the first Jedi in history to become a Force Ghost, maintaining his personality and wisdom after death, just appearing in an ethereal form instead.
That appears to be an option available to most Jedi who are dedicated enough to learn exactly how to do it, but the options available to the Sith are considerably more opaque in the Star Wars lo