First attempt: He went back to King Aerys II (the Mad King) and warged into him to make him use wildfire to burn the White Walkers. However, this future/past warging drove him crazy, like how Hodor became braindead, making him burn King's Landing instead.
Second Attempt: He tried to figure out how the First Men defeated the White Walkers, but he arrived late and instead, built the Wall as Bran the Builder (but it still didn't work since the wall was destroyed).
Third Attempt: He traveled back to when the Children of the Forest created the Night King, but the children didn't know him at the time, so they captured him and made him into the Night King. As the Three-eyed raven warned before, "it is beautiful beneath the sea, but stay too long and you will drown". This is why the Night King can see Bran in his visions and possibly raise the dead by warging into multiple beings.
Because Bran's manipulation of the past is in a cycle, present-day Bran doesn't know the result because he didn't experience it yet. This can explain what he was doing at the Battle of Winterfell. He is shown warging into ravens to see the Night King. When he sees the massive number of wights, he might've attempted these three things when he realized chances for victory are slim. However, little does he know, these attempts just caused him to become the Night King, completing the loop.
Also, the Night King (future Bran) kills the old three-eyed raven since he hid the truth from Bran.