Flowey is the main antagonist who is the final boss in Undertale. His player meets the very first, as soon as he starts playing. At first, he seems like a sweet and friendly character in the game due to his rather non-threatening appearance. But soon he begins to behave quite aggressively and begins to attack the player with his petals, but Toriel comes to the aid of the protagonist and saves him. Then he takes him to his home.
Its further appearance occurs only at the very end. If the main protagonist remains neutral throughout the game, then the flower either kills Asgore on its own and absorbs souls, or does it after the player has killed the king of Underground.
Next, Frisk will fight the main antagonist of Undertale. He can either be killed or left alive. After that, the player leaves the current location and a skeleton in blue calls him. In another case, when the player behaves like a pacifist, the main antagonist, in the end, turns into Asriel, the son of the ex-queen Toriel and the king Asgore.
If the protagonist follows the motto of the main antagonist “Kill or be killed”, then at the end then he is going to talk about how he first woke up in the body of a flower and says that he feels a special connection with the protagonist, since then he remembers Chara, the first person that ended up in the Underground. But in the end, he will also be killed by Frisk.
Also, if the player wants to learn more about the story in the game that took place before Frisk got into the Underground, then he can learn a lot of interesting things from various notes, dialogues and other things about it. In this case, he will be able to learn about the history of the friendship between Chara and Asriel. And also about the terrible ending of their friendship, as a result of which people became even angrier with the monsters because they thought that Asriel caused the death of a human child.