You encounter 2B in the city ruins just as she leaves the resistance camp with 9S at the beginning of the game.