Before Frisk fell into the Underground, Alyphs discovered the power of EXP and showed Asgore. Alyphs wanted to do experiments on living/recently dead monsters. At first, Asgore said that she couldn't, but later he decided any highly dangerous criminals could be used in her experiments.
Alyphs created a machine that could take a monster's soul and give it to another monster. After a few months, Alyphs showed Asgore the results and Asgore made it so that any criminal would be put to death, have their soul harvested, and given to other monsters. Soon monster's personalities were being corrupted by EXP. Murder and violence occurred more often.
After a year or so Frisk fell into the Underground and discovered that most of the monsters were gone and many homes were abandoned. Only Sans, Toriel, Undyne, Flowey, Tem Shop Temmie, Mad Dummy, and Napstablook remain.
Frisk falls into the Underground, which is mostly abandoned. They encounter Flowey who tells them that it's a kill or be killed world and that he'll give them a fighting chance. He then leaves. Frisk travels through the Ruins. Many of the traps no longer work and leaves are scattered everywhere. They reach Toriel's house and the go inside.
They meet Toriel who has gone mostly insane due to a combination of loneliness and EXP. She says that they should stay and that "they" will all kill Frisk if they leave. She says that she tries not to kill anyone but that it does happen occasionally. During Frisk's nap, Toriel goes to kill Frisk, but she restrains herself from doing so. Afterward, she baked Frisk a Monster Pie which she quickly regrets. Frisk decides to leave but Toriel says that if they are going to leave and get themselves killed, that she should just take their SOUL now. Her fight is similar to Asgore's. Frisk must lower her to half health and then Toriel will spare them. Frisk after sparing Toriel leaves the Ruins and makes their way through Snowdin and to Waterfall.
Frisk walks in the tall grass and sees Undyne kill a monster. When Frisk got to Mad Dummy, now called Insane Dummy, he attacks them with LV.2 Dummy-Bots. Frisk tries to talk to the Insane Dummy. Later in the fight, Frisk convinces the Insane Dummy to talk to his cousin Napstablook.
Frisk then encounters Undyne who is half melted and is 2x harder than Undyne the Undying. She refuses to talk for awhile. Frisk eventually gets Undyne to stop killing people and protect them from people that are like her. After this Flowey tells Frisk that they might be able to make it out of the Underground alive. Frisk makes it to MTT Resort which is boarded up. Inside there is a Temmie wearing full Temmie Armor who gives Frisk a hotdog and tells them to run.
Frisk makes it to the Judgement Hall the pillars there have been knocked down by someone. Frisk then goes to the Throne Room and finds Sans. He is wearing Asgore's crown and he is talking to Papyrus's scarf. Sans then attacks Frisk. The battle is much harder than the regular Sans battle. Sans now uses red attacks which are instant kills if they are touched. Frisk flees after Sans falls asleep and they make it across the Barrier.