How can a transformer convert the voltage of the same wire before and after connection?
After connecting the wires, I get the numbers written on transformer, 0, 220, 380.

It's a single phase transformer.
The primary winding also works like an auto transformer.

When 380 V is applied between terminals '0' and '380', the voltages between '0' and the other terminals will read 20, 20, 220, 280, 440, 500 and 550 V.