Atmospheric drag vs gravitational drag curve.
The turn is not an instantaneous, or even a short maneuver - it begins either shortly after clearing the tower or in some cases - even before launch! and lasts until vertical speed is sufficient to clear the atmosphere and reach vicinity of apogeum, quite late into the flight.
The trajectory - and directly related angle of burn - is a result of optimization of the function of gravity losses and atmospheric drag losses: while reaching orbital velocity ASAP (burning horizontally) is the way to minimize loss due to gravitational pull of Earth ("gravity drag"), this is offset by atmospheric drag, which at low altitudes makes it impossible, and at somewhat higher altitudes economically suboptimal - as you lose more to pushing air out of your way than you prevent losing to keeping the rocket from falling down.
What decides what the curve should be in case of given, specific rocket? Aerodynamics and engines, and to a lesser degree, payload and structural durability.
The thrust to weight ratio (TWR) of the rocket, dependent on the rocket mass and engine thrust, decides how fast the rocket can climb and accelerate. Aerodynamic profile decides what losses air drag incurs. Structural durability says how it can handle high dynamic pressure (MaxQ) and may impose throttling the engine to reduce risk to the rocket and atmospheric losses. Payload may be rated for certain accelerations, which limits allowable max TWR.
The linked above SS-520 has a very high TWR and very lean aerodynamic profile; it can reach high altitudes really fast, so it starts at an angle, beginning the "gravity turn" (as the curving launch profile is sometimes called) right from the moment of launch. About all other launchers begin the turn at latest after clearing the launch tower, but the initial tilt might be very small.