there are different timelines. the 1st timeline was when takopi met Marina and she killed herself blah blah blah because of Shizuka stole Naoki away from her so takopi's new goal was to kill Shizuka but the Happy Mother erased all his memories and sent him back into the past again (the 2nd timeline with the whole Chappy getting taken away stuff) in which he encountered Shizuka instead of Marina and after he realizes that he can't stop Chappy from getting taken away, he uses the last happy power in the camera to go back to the past one more time. He then sacrifices his innocence/himself to give both Shizuka and Marina happiness/innocence, and this is the last/present timeline in which Marina was about to bully Shizuka but saw her drawing a picture of takopi. Even though both of their memories had been erased, they somehow felt something while looking at the drawing and bonded over it, then became friends

I am pretty confused on what happened in the last few chapters but it was good