Observation of first- and second-order dissipative phase transitions in a two-photon driven Kerr resonator