This question comes from Stranger Things season 1: Barb is killed by the Demogorgon in the Upside Down, while Will survives long enough to be rescued.
In‑story reasons
Barb is attacked and dragged into the Upside Down at Steve’s pool, and by the time Nancy finds her later, Barb is already dead and partially decayed, with a slug emerging from her mouth, indicating the monster’s infection attempt failed and she became just another victim. Will, on the other hand, spends days hiding and evading the Demogorgon in places he knows well, and when he is finally captured he is cocooned but still alive, so Joyce and Hopper can pull him out and revive him.
Some fan theories suggest the Mind Flayer (revealed later) needed a younger, more suitable host, so Will was kept alive as a potential vessel while Barb was effectively “used up” or killed in the process of an unsuccessful infection. Others point out that Barb was simply alone, injured, and in the wrong place at the wrong time, with no one urgently searching for her the way the entire town searched for Will.
Storytelling reasons
From a writing point of view, Barb’s death is meant to show how lethal the Upside Down is and to give Nancy a source of guilt and motivation, while Will is central to the show’s main mystery and ongoing plot. Creators have also said Barb’s fate was used to underline how vulnerable “ordinary” characters are to the monsters, whereas Will needed to survive to set up later seasons and the larger myth arc.
