On The Flash, Barry Allen went to visit his future-self to figure out how to stop Savitar from killing Iris. But when he arrived in the year 2024 he found that future Barry was not only had alternative rocker bangs, but was also pretty useless.
Future Barry told Present Barry that he tried to stop Savitar over and over and over again but that it was impossible. In fact, Future Barry was a pretty depressed guy whose main advice was, "Spend as much time with Iris as you can because pretty soon you'll never see her again."
Barry realized all of 2024 was depressing, particularly the fact that there was no Team Flash. So he got all his old buddies together, except for Iris because she's dead at this point, and showed them that they can still make the world a better place.
Inspired by Present Barry's commitment to being better, Future Barry remembered a small fact that might help save Iris's life. In 2020 a physicist named Tracy Brand invented a Speedforce trap to catch Savitar. So present Barry just has to figure out a way to help her invent the trap much sooner in order to save Iris.