Being the last person alive after a terrible event is one of the most tragic things an anime character can go through - and it's a trope that appears again and again throughout anime. Some sole survivor anime characters are motivated by their painful pasts to get revenge - that's why Sasuke Uchiha wants to take out his brother for what he did to the rest of their clan. Others are less vengeful, but still often end up fighting against the thing that ruined their lives in the first place.
Not every character on this list is literally the only person to survive a harrowing event. Guts from Berserk, for example, believes himself to be the only member of the Band of the Hawk to survive Griffith's betrayal, but later finds that both Casca and Rickert were still alive. Nezuko Kamado isn't the only member of the Kamado family to survive the demon attack - but her brother Tanjiro only survives because he wasn't actually there.
While Tanjiro Kamado is out selling charcoal in a nearby village, a demon massacres his entire family - except for one person, his sister Nezuko. Though Nezuko is the sole survivor of this horrific event, she didn't come through unscathed. She was bitten by a demon, and as a result, she transformed into a demon herself.
After discovering the remains of his lost family, Tanjiro dedicates himself to turning Nezuko back into the human girl she once was. At first, her powers are completely out of control, but he refuses to give up on her no matter what.
What begins as an educational trip to see the Deadman Prison ends in tragedy when the Red Man takes out every member of the class except for Ganta Igarashi. Ganta is knocked out, and when he comes to, he finds that not only have all of his classmates been eliminated, he's being blamed for it and will be forced to serve time as a result. Ganta seeks revenge on the Red Man, but later discovers that this person is actually his childhood friend, who was driven to violence through means that Ganta is deeply familiar with.
When Sango's demon-hunting village is destroyed by her brother Kohaku, she's the only person who survives - though Kohaku is later reanimated. Kohaku did this not because of any malice he bore toward his village, but because he was possessed by a demon. Every village resident, including Sango, is buried, but Sango digs her way out of the grave. She ends up joining Inuyasha and company in their battle against Naraku, in the hopes of breaking Naraku's control over her brother and reviving him properly.
When Shinra Kusakabe was a child, he woke up to discover that his house was on fire. In the midst of trying to escape, he awakened his Third Generation ability, which allowed him to produce and control flames from his feet. He was rescued, but the other members of his family were destroyed. Most people assumed that the event was Shirna's fault due to his recently awakened powers, and to a degree he also believed this - but he also thought that the black shadow he saw might have something to do with it.
As it turns out, Shinra's brother Sho actually survived as well, becoming the commander of the Knights of the Ashen Flame. But Shinra still spends his whole childhood believing that he was the only one.