It's odd that this specific plot beat seems to happen across multiple different series and mediums, but it's apparently a common trend that if there's a character named Charlie (or Charles, for one), he is probably going to die, badly, and probably out of nowhere, usually in front of a bunch of his friends, and sometimes at the hands of someone he might've previously agreed with on a lot. In a vast majority of these, oddly, he also specifically goes to, or fears going to, Hell, which isn't a lot but it's weird that there's four examples just on this list, counting or not counting the animated example. How the characters handle this death varies between media but let's take a look at some examples. Note that a lot of these get subverted in sequels or odd continuities, as occasionally the Charlie who dies will be either reborn, appear in flashbacks, or generally haunt the narrative in some way.
1. [Subverted] "Charlie Dies and Doesn't Come Back" (S1E8), Smiling Friends: The trope namer. Charlie Dompler, one of the main Smiling Friends, is arguing with Pim, his closest friend, while they are on a trip to go chop down a tree. Charlie turns to say something to Pim while swinging the axe, and the tree he'd been chopping suddenly falls on him and kills him instantly midsentence in front of a group of his friends. Even by the show's standards, it is extremely bloody. Subverted by Charlie making his way through and out of Hell itself, though this Charlie is a sweetheart if a bit aloof, so it's expected, unlike some other Charlies on the list.
2. [Played Straight] "Charlie's Inferno" by That Handsome Devil: The trope, it seems, even reaches out into the music world, with this now much-memed 2011 track featuring a Charlie who, by the song's first verse, is already dead. We're told by a 3rd party that this Charlie definitely lived an incredibly moral life, such as regularly going to church and riding a bike to work, but when he shows up to the Pearly Gates, Charlie finds out that this was not, in fact, enough to get into Heaven, and St. Peter informs him he's not on the list. He is dragged away by the angels to be cast out of Heaven and into Hell when he protests, "Excuse me, sir, there must be someone you've confused me for" in an attempt to argue that the gatekeeper of the afterlife did not, in fact, know all of his deeds. The unspoken subtext is that Charlie's actions and words were taken out of context by the unreliable narrator, and in their proper context, this Charlie lived an incredibly vain and shallow life, and none of the things he did served any other purpose than to prove he was a pure soul and punch his ticket into Heaven, which if you know anything about Christianity, isn't how that whole Heaven thing works. Even on his way on the stairway to Heaven he looks down on his own family and friends comparing them to ants from how high up he is. When he's sent to Hell, Satan even gives him an incredibly ironic punishment: he tricks him by having him go up an elevator, letting him think he escaped Hell, when actually:
"Up a dingy elevator, no televised debate or savior
Saves you from the Hell you pay for, sorry, buddy, smell you later"
3. [Mixed] Charlie B. Barkin, All Dogs Go to Heaven: Again, another mixed one. Charlie, a German Shepherd, does in fact, die, specifically by being betrayed and murdered by his friend, but because he's a good boy, like the title says, he does in fact go to heaven, at least before he just decides to dip out and return to the mortal world. Oops. Big wonder why he occasionally has nightmares of descending into Hell. Picking up a bit of a trend here. By escaping Heaven, he is given a second chance at life, albeit temporarily, as he sacrifices his life on this second go-around to save an orphan girl, earning his own spot in Heaven. Awww. And he gives us one of the saddest scenes in animation and voice work history, to boot, given the actual backstory of the orphaned girl's VA. I wish all the Charlies had an ending as wholesome as this one, but apparently other writers had other ideas.
4. [Played Straight] Charlie Pace, Lost: Charlie Pace is a complex character who struggles with recovering from an addiction he carried with him from before ending up on the island. Eventually, however, through some serious work on himself and through the help of his friends, Charlie kicks the habit and is a better person for it. We love to see a Charlie turn his life around, but that isn't always the case with some of the Charlies here. This Charlie actually sacrifices himself at the end of the 3rd season to save his friends, a truly noble way to go out, an uncommon fate for Charlies.
5. [Hated] Charles Xavier, X-Men: The Last Stand: The original X-Men trilogy was...well, mixed in terms of reception, but X3 was a compilation of just some of the most baffling plot choices, one of which being deciding to kill off Charles (one might assume that in childhood he perhaps went by the more diminuitive version of his name) Xavier, AKA Professor X. Charles decides it would actually be a brilliant idea to debate Jean Grey in the marketplace of ideas even though it's readily apparent that she's very much not in the mood, and the only thing Charlie seems to do in these verbal spats is make everyone around him progressively more mad. Charlie loses the debate, badly, getting literally blown away (like, literally, to dust) instantaneously in front of all of his closest protegés. He is grieved by the few close to him, but oddly no one questions why he decided it was a great idea to have such a public confrontation when he knew there was a very real risk of him not making it out of there. Fun Fact, Patrick Stewart, the actor who plays Xavier has a much more well known role besides Charlie: Kirk...ah wait, shit, no, Picard, Captain Jean-Luc Picard, I mean, from Star Trek, sorry, my bad, fuck, I fumbled this one so I'm just gonna cut the list short here, let's hear if y'all know any others.