The Elseworlds comic, "Justice League: The Nail", where Jonathan and Martha Kent's truck is incapacitated by, you guessed it, a nail (stuck in the tire). This prevents them from going into town, which prevents them from seeing Superman's rocketship crash land, which means they never adopt baby Kal El (he is instead adopted by the Amish), which means Superman doesn't become the DC universe's iconic hero. Without the Big Blue Boyscout around to inspire confidence and good feelings about metahumans among the general populace, the American people (particularly those in Metropolis) become highly suspicious of all superbeings, even to the point of hunting them down and locking them up simply for existing. The story even begins with the above poem.
It turns out that much of the reason for the anti-metahuman paranoia is fueled by the Kryptonian Eradicator Jimmy Olsen, who in the absence of Superman is able to operate much more slowly and subtly as far as its attempted conquest of Earth.
And also The Joker kills Batgirl and Robin. Horrifically. In front of Batman. Who goes Unstoppable Rage mode and kills him too. It's not even shown on-panel but it's still horrific.
And in the end, the cycle closes with the Amish community where Not!Supes lives being involved in the conflict. Jimmy kills Not!Supes's Muggle Foster Parents in front of him, thus he ends up adopted again... by the Kents.
Another well-known Elseworlds comic, Superman: Red Son has a slight difference in the rotation of the Earth as the "nail", so Superman lands in the Soviet Union, eventually rising to become leader of the union. Similarly, Superman: True Brit... you get the idea.
Well, in True Brit, the planet's rotation wasn't the only thing that was off...
In The Superman Adventures, "Yesterday's Man of Tomorrow" demonstrates to the audience (and to the instigator, Mxyzptlk) that fooling Superboy into exiling himself is not a good idea. The result is a world where Lex Luthor is the richest, most powerful man on earth, Lois Lane is dead, and the Kents are alone in their old age, wondering what happened to their son.
Star Wars did its own spin on this with the limited comic seriesStar Wars: Infinities, each story exploring how such a change would affect each of the Original Trilogy films. In specific...
In A New Hope, Luke fails to destroy the Death Star because one of his torpedoes malfunctions. As a result, the Empire catches several Rebels trying to escape Yavin, including Leia, who Vader trains as his apprentice. In the meantime Luke trains with Yoda, and after five years he confronts Vader and Leia, ultimately ending when Yoda Colony Drops the Death Star on top of the Emperor's palace.
In The Empire Strikes Back, Luke dies on Hoth, leading Han and Leia to seek Yoda. Lando doesn't betray Han, getting Cloud City destroyed. C3PO ends up in Vader's hands and finds out about Dagobah, leading him to confront Yoda (and get into a mental battle against the spirits of Jedi passed like Qui-Gon and Mace). Vader gets killed by a surprise attack by Han, leaving him and Leia to rejoin the Rebels and fight the Emperor.
In Return of the Jedi, C3PO gets disabled by accident, forcing Leia to reveal her identity to Jabba and allowing Boba Fett to escape with Han in the confusion. Yoda dies before Luke can hear his final message, meaning Luke (and the Emperor) sense his death and Luke gets captured leaving Dagobah. Meanwhile, Leia mounts a rescue mission to save Han, but he's become permanently blind. Because the heroes don't befriend the Ewoks, they attack both sides at the shield generator, meaning Han and Lando have to take it out. Luke and Leia manage to redeem and rescue Vader, who dons a white costume and joins the good guys in hunting down the Emperor.
In a nice touch, the highly trained Force users can sense that things are not as they should be, though they don't quite know what is going on. They just know the Force is going nuts.
Star Trek has the series The Last Generation, where the assassination plot from Star Trek VI succeeded (thanks to Captain Braxton), resulting in the Klingons dominating the galaxy as far as the Next Generation era, with most of the TNG cast as scarred resistance fighters, Worf as the leader of the Klingon Empire, and Sulu using the Excelsior to make hit-and-run raids on the Klingons as "the Silver Ghost".
The Prophecy of the Destruction of the Green Lantern Corps foretold that all of the enemies would unite to destroy the Corps. The turning point would be when the Five Incursions of the Empire of Tears would join to destroy the Corps, Ranx destroying Mogo with a Blink Bomb and the Children of the White Lobe killing Sodom Yat. All the players except the Empire of Tears joined in the Sinestro Corps War, all because Sinestro pissed the Kingdom of Tears off back during his days with the Green Lantern Corps. When still a good guy, Sinestro arrested the leader of the Kingdom of Tears for their part in murdering Abin Sur, whose replacement Hal Jordan would lead the Green Lantern Corps into battle to save the Corps.
Of course, this also ties into the War of the Lights/Blackest Night prophecy; at the start of the Sinestro Corps War, the Guardians revolted against Ganthet, the Guardian who insisted on recording the prophecy of how the Green Lanterns would be destroyed and who sought to use the prophecy as a guidebook to try and stop Sinestro and his allies. They kicked Ganthet out, which led to him forming the Blue Lantern Corps and pretty much began micromanaging the Green Lantern Corps to such an extent with petty rules to weed out emotions, that it has led to the Corps being weakened due to mass resignations, most of which have been orchestrated by a mole Scar who's leading the Black Lanterns to wipe out the Green Lanterns.
In Watchmen, Jon Osterman's flashbacks in Chapter 5 reveal that he believes that Janey Slater's watch band breaking is the nail that lead to the accident that turned him into his god-like form as Dr. Manhattan. The watch band broke, somebody stepped on it, and then John took it to fix the watch. One month later, after he had fixed it, he left the watch in his labcoat, which he left in the intrinsic field chamber. Janey asked for the watch, Jon went back to the lab to get it, and was locked in the chamber, and then... disintegrated.
The watch band breaking led to Osterman becoming Dr. Manhattan, and thus to the differences between the story's history of the Vietnam War and Cold War and Real Life's history, but the timeline had diverged before then during World War II or so when costumed vigilantes began operating, and there's no definite "nail" for that part. (Although the presence of costumed heroes as reality meant that superhero comics were all but dead. The big thing? Pirates.)
Note here that Osterman probably wouldn't acknowledge there was a "nail" at all. Since he sees all times in his life simultaneously, his worldview is that everything in his life is fated to happen - that is, there is no divergent timeline that the "lack of a nail" could create.
Marvel Comics has the What If? series, a title based entirely on this trope. Issues that occur include what would have happened if Spider-Man had joined the Fantastic Four; what would have happened if Rick Jones had been turned into the Hulk instead of Bruce Banner; what would have happened if the Invisible Woman had stayed with Namor; what would have happened if Jane Foster had found Mjolnir instead of Dr. Donald Blake; what would have happened if Aunt May had been killed by the burglar instead of Uncle Ben, etc. What's especially noteworthy about these series is how much worse off many of the characters tend to be if things didn't turn out the way they did (interestingly, Spider-Man, usually Marvel's whipping boy, comes off better than before at least as often as he comes off worse, probably because the default state of his life is suuuuuck).
While What If generally used this trope straight, stories occasionally played with it. One story has the Fantastic Four never receiving their powers, but becoming entirely successful adventurers anyway.
And one of the more interesting playarounds in this series is an issue in which Dr. Doom never suffers the accident that injured him and twisted him into a supervillain. Rather, he becomes a superhero, and life actually goes from strength to strength for him. On the other hand, once again, it is his own ego that causes the driving complication of his life.
Exiles can be considered a Spiritual Successor to the What If? series; the team would frequently visit realities where one small thing had massively changed how things had happened, and there would always be at least one page explaining what the 'nail' was and its various knock-on effects. Generally, but not always, their job was to repair the reality by setting things back to how they should have been in that reality. This does not always mean changing reality to be like the standard marvel universe but instead to fix things so they are the way that universe was originally supposed to turn out. The general idea was that something caused a number of the different realities to be messed up and the main characters were traveling around fixing them so that they were back on track, even if that track was not the same as the standard marvel universe.
Tom Strong had an entire story arc about the alternate reality where, due to a two-minute delay, their ship to Attabar Teru encounters slightly different waves. Where in "our" universe, the sailor Tomas Stone died when the ship wrecked upon reaching the island, in this one it was Sinclair Strong who died. Consequentially, everything changes: long story short, Tom Stone grows up to be less powerful or scientifically minded than Tom Strong, but much more emotional and compassionate. He ends up reforming nearly all of his enemies, and with them creates a virtual utopia until destroying it by sleeping with his best friend's wife Dhalua, who is Tom Strong's wife in "our" universe.
The comic W.I.T.C.H. dabbled with this early in its run. In issue 50, we're shown one universe where Will refuses the Heart of Kandrakar. However, the girls still become Guardians - the Heart's very insistent.
There was a one-shot focusing on Cornelia, Caleb and their relationship had they remained together (in this universe, they broke up after dealing with Nerissa). One story had Cornelia leaving the team and joining Caleb in Meridian. Though she's happy, it doesn't last long and, soon, the girls confront her and convince her to return. The only major difference here is that, where the main universe had Orube replace Taranee, here not only does she replace Cornelia, she and Will end up swapping powers so that Orube's leader and Will control Earth. The other story had Caleb join Cornelia on Earth. His Fish out of Water-ness is so bad that it ends with Irma shot by her own father (by accident) and the girls' identities exposed.
The third story arc of the My Little Pony: Friendship Is Magic lampshades this trope - the story is driven by the fact that Big Macintosh needs nails to repair the gazebo, forcing him into town and the various antics that occur there. The trope is hammered in by the branding of the empty nail box: "For Want Of" Brand Nails.
During a point in Archie Comics' Sonic the Hedgehog where Knuckles had joined the Dark Legion in an attempt to rescue his friends, family and the people of Echidnaopolis from the Quantum Beam the Legion used on them, he decided to use his awakened Chaos powers to undo certain points in Echidna history. First, he tries to destroy the White Comet, only for an freak earthquake to destroy the city. Then, he hypnotizes the High Magistrate of Echidnaopolis to allow Dimitri and Edmund's plan to lower the island to go through, only for Angel Island to crashland in the attempt. His final attempt is to stop the assassination of Edmund, only to start being roboticized due to no Brotherhood of Guardians to try to keep Robotnik in check. Ultimately, Knuckles decides to just undo the effects in the present. Interestingly, the events also altered the rest of Mobius, though they show four alterations while Knuckles preformed three events. The first change shifted them into the Sonic The Hedgehog The Movie universe, the second change was one where Mobotropolis and the Brotherhood were allies and the coup was stopped by Tails' dad. The third change shifted them into the world of Sonic Sat AM and the final change is the alternate universe where Sally died at the end of EndGame
"The Lost Battle", a backup story in an early 70s issue of Tomahawk, is about an American Civil War battle lost by the Confederacy because a shipment of oil arrived late. Without the oil a cannon rusted, which led to one of its wheels snapping off before it could be put into position, which led to the Union pushing through the gap in the Confederate line. And yes, it's implied that this may have been the last battle before Lee surrendered, which would mean that the war was lost because of the late oil delivery.
In New X-Men, Reverend Stryker attempts to invoke this: Using knowledge of the future provided to him by Nimrod, Stryker targets Wallflower and Dust for assassination. In the original timeline, Laurie single-handedly stopped Stryker's attack on the school. After she is killed by one of Stryker's henchmen, the future is changed showing Sooraya doing so instead. However when he attempts to do the same by killing Dust, his plan is foiled when X-23disguises herself with one of Dust's ''abayas'' and is attacked in her place.
During Infinite Crisis, the Modern Day and Golden Age Supermen, Kal-El and Kal-L, are slugging it out and time distortions force the two men to live out each other's lives. However, both men decide to futz with the timeline doing so. Kal-El steps in during the Red Scare and reveals his identity to the world while showing his disapproval of their actions. Meanwhile, Kal-L calls Batman's bluff when they first meet and is able to convince him to start working together. Both of these actions leads to two different bad futures - because Kal-El used his power to make Earth-2 a peaceful place, it allowed the Anti-Monitor to slap him down like a punk when he invaded while Kal-L's more brutal tactics lead to a Superhuman War that ravaged the Earth. Both men decide that the other's world cannot be allowed to exist.