Shouldn't the order be Z>Y>X as X structure has incomplete octet of oxygen and nitrogen
A structure is not feasible with incomplete octet on oxygen or nitrogen even halogen also.
So only one structure has incomplete octet in which carbon has positive charge.In rest of the structures lone pairs on N and oxygen are not shown and you need to predict based on the formal charges on them.
In exams lone pairs on hetero atoms are not shown many times.