NieR: Automata is a philosophical masterpiece, bringing multiple different philosophies together. As you explore the world as a YoRHa, an android force deployed by humans, you fight many machine lifeforms that have invaded the earth. Humans have fled to the moon and left their robotic counterparts to fight well, other robots! That is also an interesting statement about war, but that can be left up for interpretation. Each part of the game has a set of philosophies within the game.
The first part; or part A, has the philosophy of body and mind as it main course. As you the start the game, in the prologue ends with the main characters blowing themselves up and sacrificing their corporeal forms. But they are later reconstructed with the exact same personalities, memories and emotions. Later you meet a person who asks you for body parts to repair his leg, but in the end he doesn’t even take the new part because he feels he’ll lose himself without his leg.
Part B is all about revenge and how it can create endless war, the second main character is driven by revenge and finds himself lost at the end. Many of the enemies defeated in the first part come back and seek revenge covered in gold, but they soon fail. As the last revenge driven enemy dies they yell “My father, my mother, brothers and sisters have all gone, all in the name of revenge, now I have nothing left to lose besides myself. And now I too have been lost.” Just like Part A you meet a character that asks you to search for a missing android. When you come across the android, their body is torn apart by a machine lifeform, and the machine runs away. After you report this incident to the worried android, they become enraged and seek revenge, only to meet their demise soon after killing the machine held responsible.