WandaVision is Marvel’s live adaptation of the “House of M” story from the comics, in which Scarlet Witch (Elizabeth Olsen), experiencing loss so profound that it fractures her mind, creates an alternate reality to supplant everything. the Marvel universe for a while.
Fans have assumed that it was the loss of Vision (Paul Bettany) in Avengers: Infinity War that led to Scarlet Witch creating an alternate reality in WandaVision but it could have been another more painful situation that is tied to her children.
Even as the villain Wanda she was a sympathetic character, lost in such overwhelming pain that her mind retreats to the safe space of an alternate reality instead of facing the truth by revealing what is seen on WandaVision.
She realizes that she wants to have children with her husband, Vision, but because he is an android, they cannot conceive naturally. Instead, she uses her powers to create two children: Billy and Tommy who may be the ones seen on WandaVision.
Wanda inadvertently made them with part of the soul of the demon Mephisto and when he finds out, he absorbs the spark of the boys into himself. To protect Wanda from WandaVision, Agatha wipes the twins’ memories from Wanda’s mind.
The memories of the time when Wanda, Vision and the children were a family come back to her and are so painful that her psyche begins to crumble and everything finally leads to Wanda supplanting reality for hers happier as appreciated in WandaVision .