I think it is a combination of having a reliable and adjustable temperature profile in combination with some experience and experimentation.
Being able to generate a repeatable temperature profile in the oven is one part of the equation.
Some use loose thermometers, which can be clipped to the PCB, but if the thermometer is in a fixed position then there wil (hopefully) be some fixed and repeatable temperature difference between the thermometer and the board itself.
On the first board this temperature difference is unknown, which is where it becomes handy to be able to live monitor the soldering process.
Based on previous experience you make an educated guess, and then tweak it a bit in time or temperature untill it works for the PCB to be soldered.
There are also a lot of reasons for temperature differentals in the oven, which makes soldering more difficult.
Compare black (good IR absorption) and shiny (Reflect IR) components.
Some thick components can also take more time to heat than other thinner components.
I've heared some success with usig a frying pan with a layer of fine clean sand, which heats the PCB evenly from the underside.
The sand has a high thermal mass, so you probably have to use a plier to take the hot PCB out of the sand to prevent overheating.