The use of time travel to save a post-apocalyptic world is a common trope in various forms of media. Dragon Ball Z offers a unique perspective by using time travel to incite the conflict rather than solve it. Trunks hails from 20 years in the future, where he is the last remaining Z Warrior. His plan to change the past to save his own decimated future only complicates the story's main timeline.
The future the young half-Saiyan comes from is bleak. Six months after Goku succumbs to a deadly heart virus, two lethal and deadly androids appear. These new villains meet the Z Fighters in battle and slaughter them, with only Gohan surviving. With no one left to challenge them, the evil duo turns the entire planet into their personal playground as Earth's population is reduced to tens of thousands. The few survivors are forced to live in hiding underground.
Death is ordinarily of little consequence in the Dragon Ball universe. In Trunks' future timeline, however, Piccolo's death renders the Dragon Balls useless. The Namekian Dragon Balls are also not an option because no one knows the location of New Namek. In this timeline, wishing people back to life is off the table -- permanently.
The son of Vegeta and Bulma, Trunks grows up in this devastated world. Gohan, now an adult, is the young hero's mentor and only friend. Despite being a Super Saiyan himself, Gohan is still unable to defeat the androids and eventually loses his life to them in battle. This loss pushes the grieving Trunks into the Super Saiyan state for the first time. Unfortunately, the sibling androids eat Super Saiyans for breakfast and the last Z Warrior remains powerless to stop them.
At the cost of many lives, Bulma builds a time machine so Trunks can travel to the past to save Goku's life. She hopes that together, they'll be able to defeat the androids and change their doomed future. However, it is unknown to mother and son whether traveling to the past will change the future or create a branched timeline. They deem it an acceptable risk and carry out the plan.
Episode 131 of Dragon Ball Z gives the first indication that Trunks has inadvertently caused the series' main timeline to branch off from his own. The time-traveling Saiyan finds the remains of the freshly destroyed Android 19, whom he has never seen before. In his meddling with the timeline, he might have done more harm than good.
Despite being given the cure to the heart virus, Goku contracts it much later than expected. This change to the present still takes the mighty Saiyan out of the first battle with the androids. When 17 and 18 finally appear, not only are they are far stronger than they were in Trunks' timeline, but they also activate the mysterious giant Android 16. As a result, despite all of their training, the Z Fighters are still no match for them.
Unexpectedly, Androids 17 and 18 are so powerful that they don’t feel the need to eliminate the Z Warriors. This unexpected outcome means the main timeline has now completely broken from Trunks' future. The Androids have arrived and yet Goku and the rest of the heroes are still alive.
The warning may have saved their lives in the initial battle, but there were more changes in store for the present. Dr. Gero's ultimate creation, Cell, requires the absorption of Androids 17 and 18 to achieve his perfect form. But the Androids have been destroyed in his own time -- a future after the one Trunks came from -- so Cell has come back to the present to achieve his perfection.
By interfering with the flow of time, Trunks set off a chain of events that caused the appearance of three new androids. It also provided Cell with the means and opportunity to achieve his Perfect form. In the end, Trunks' warning does succeed in saving the world of Dragon Ball Z, albeit in an unexpected way. The great cosmic irony is that the original mission was to save Goku's life and change the future. When all is said and done, Goku is dead anyway and the future that Trunks set out to save was unaffected.