The ending of 'Avengers: Doomsday' explained:-
Despite the heroes' best efforts, the Incursions reach a breaking point. The universes violently collide and shatter into nothingness, wiping out almost every single person in existence.
Doctor Doom survives the destruction. It is revealed that when he murdered Loki at the TVA, he stole Loki's immense, reality-weaving multiverse powers.
Creation of Battleworld: Using Loki's stolen power, Doctor Doom pieces together fragments of the destroyed realities to construct a patchwork planet known as Battleworld.
A Fake Reality: Doom resurrects the deceased heroes and characters into this new world, but completely wipes their memories.
The characters begin entirely new lives, completely unaware of their pasts, believing Battleworld has always been their home.
The Final Shot: The movie ends on a chilling note, with Doctor Doom successfully establishing absolute control. The final frame shows him sitting on his throne, reigning supreme as God Emperor Doom.
#AvengersDoomsday
Peter Brings the Avengers Back Together in 'SECRET WARS'
Peter gets the Symbiote suit at the end of 'SPIDER-MAN: BRAND NEW DAY' and returns in 'SECRET WARS' wearing the black suit.
When reality is rewritten and everyone else loses their memories, Peter is the one who still remembers.
The Symbiote's multiversal hive mind preserves those memories, making him the only person who can find the Avengers and bring them back together to stop Doom.
It's beautifully ironic. The world forgot Peter Parker, but Peter never forgot the world.
This is the plot of 'AVENGERS SECRET WARS'