The first trailer for Spider-Man: No Way Home depicted how being outed as a superhero has made life more difficult for Peter Parker, with paparazzi hounding him on the streets and his relationship with Mary Jane deteriorating. As a result, Peter approached Doctor Strange (whom he befriended during the events of Avengers: Infinity War) and asked the Sorcerer Supreme if he could cast a spell that would make the rest of the world forget he was Spider-Man. Surprisingly, Strange accepted, but the spell’s ramifications appear to be terrible, and both Strange and Spidey will have to deal with them.
This is essentially a condensed version of the events of the Amazing Spider-Man comics, focusing on how Peter Parker’s secret identity was restored after the events of Marvel’s Civil War.
Peter Parker initially revealed his secret identity to the world on purpose, in order to aid Tony Stark in promoting the Superhuman Registration Act. The Kingpin attempted to murder Peter shortly after, fatally wounding Aunt May in the process. This sparked the contentious One More Day plot, in which Peter made a bargain with the demon Mephisto to save Aunt May’s life in exchange for his marriage to Mary Jane Watson.
Many people disliked One More Day because of the many continuity snarls generated by removing Peter and Mary Jane’s marriage from the chronology, despite the fact that the plot revolved upon the ever-responsible Peter Parker striking a Faustian deal rather than face the repercussions of his actions. Editor-in-Chief Joe Quesada of Marvel Comics sought to resolve these issues in One Moment in Time, a sequel to One More Day that detailed how Peter and Mary Jane’s wedding went down and how the world forgot that Peter Parker was Spider-Man after the events of Civil War in the new timeline.
Mary Jane had been gravely wounded while attempting to shield her Aunt Anna from a second assassin dispatched by the Kingpin to eliminate all of Spider-family, Man’s according to One Moment In Time. Peter asked the Sorcerer Supreme while taking Mary Jane to Doctor Strange for treatment if he could cast a spell that would rewrite reality so that no one would know he was Spider-Man. Doctor Strange decided to assist after speaking with Tony Stark and Reed Richards of the Fantastic Four, and everyone but Peter Parker and Mary Jane Watson forgot who Spider-Man was, even if they knew Peter’s secret identity before he revealed himself to the public.