If you apply a sinusoidal voltage, the magnetization current (nothing to do with load currents) is formed from V = L di/dt (Faraday's Law). So, reversing the formula, you find that magnetization current is the integral of applied voltage. That shifts magnetization current by 90 degrees and also provides a core flux that is shifted 90 degrees. Then to the secondary...
The induced voltage in the secondary is subject to the formula V = N d(\$\Phi\$)/dt so the 90 degrees phase shifted flux produces a secondary voltage that is shifted by a further 90 degrees making 180 degrees in total.
it would follow that the secondary voltage (sinusoidal input) of a
transformer should peak when the primary current is changing fastest —
that is at the zero crossing. It doesn't.
With no secondary load current, the induced voltage in the secondary is shifted from the magnetization current by 90 degrees. If full load is applied the primary circuit contains both magnetization current and "primary referred secondary load current" this latter current is 180 degrees out of phase to the secondary load current. Here what it looks like for a simple step voltage applied: -
Picture and further reading source.