Many years ago, Formula 1 allowed a great variety of paths on the same track. It was possible to see drivers taking the same curve in different ways and the advantage went to those who discovered the best way to take it.
With the professionalism of more recent times, everyone knows the optimal line to take and try to make it exactly right. For this reason, today the advantage is in the thousandths of a second gained in the braking before the corners and post-apex acceleration.
In the case of braking, the rule seems simple: braking as hard and deep as possible, thereby losing little time. But nothing is that simple: making a mistake and braking too late means a greater loss of time. Worse yet, it can cause the wheels to lock causing excessive tire wear and even a spin with unpredictable consequences.

“There aren’t mathematical formulas to follow; braking is perhaps the part of driving that requires the most effort and the most training so that it can be done with perfection.”

There is an old rule that says braking should only occur in a straight line – i.e. before turning in – because of the load transfer that occurs at that moment: the front tires are overloaded and their grip is increased but if this is done in a bend, this transfer also occurs laterally and could cause problems in controlling the car.
In the case of rain, hard braking is also possible, but the reduced grip in these conditions requires special care such as the driver-activated brake balance or brake bias, which distributes more efficiently the braking force among the four wheels for a better performance.