Trouble with identifying wiring for heat pump setting up Nest
First, the labels you need to look at are the ones on the outside - not the ones under the wires.  The labels under the wires are for a conventional system.  Looking at the labels on the outside, it's clear that the two yellow wires are Y and Y1, and the white wire on the left is AUX, which is normally Auxiliary or emergency heat.

Y and Y2 are normally used for a modern HVAC system that has dual stage cooling, so neither should be used for heat specifically.  On a conventional system, the W wire is used to call for heat, but on a heat pump, a combination of the O wire and Y wire(s) call for heat.

Choosing O for the switch over valve wire is a safe bet.  If you choose wrong, the heat pump will start in heating mode when you call for cooling or will not go into heat mode when heat is called for.  It shouldn't damage anything.

Also, some of those wires might not do anything for your system. For instance, I can't tell you what L, S1 and S2 do.  Maybe nothing, but you might need to look at the old thermostat instructions or the other end of the wiring on your heat pump to figure that out.