If we’re basing how Marvel Zombies ends off the plot of Marvel Zombies through to Marvel Zombies Return, then Uatu the Watcher plays a major role. We know in What If…?, Uatu claims only to watch and not interfere, but in the comic books, he actually chooses to interfere in our world against his species’ rules.
After seeing zombies ravage Earth-2149 and attempt to branch into other universes to find more uninfected flesh to feed upon, the Watcher realizes something must be done. When a few Zombie heroes teleport to a universe similar to Earth-616 called Earth-Z, the two groups of Zombie Avengers ultimately battle each other.
One group, led by Zombie Spider-Man, wants to end the plague, and the other, led by Zombie Sentry, wants to spread the plague to all the universes.
The Watcher sees the danger in this — not only could it end one universe, but it could end the multiverse as well.
So the Watcher sends the zombified Sentry back in time to when the infection begins on Earth-2149. This creates an infinite time loop contained in the two universes in which they devour themselves. Not a bad idea, Watcher, not bad at all.