Warning! This article contains SPOILERS for Agatha All Along episodes 1 & 2The sudden appearance of a corpse in Westview is the catalyst for the events of Agatha All Along, but how it got there in the first place is still a mystery. The sequel to WandaVision picks up with Agatha Harkness still imprisoned in her Agnes persona under Wandas spell. However, Wandas death in Doctor Strange in the Multiverse of Madness may have shifted the boundaries of the spell, which Agatha first experiences when investigating an unidentified body. When she ultimately realizes that it is Wandas dead body, Agatha starts to regain her memory of her past life.
https://screenrant.com/why-wanda-maximoff-dead-body-westview-agatha-all-along/