How much distance is needed?
You must stay far enough behind the vehicle ahead to stop in time even if it brakes suddenly. There are two proven rules of thumb:
Two-second rule: choose a fixed point at the roadside. When the vehicle ahead passes it, count "one thousand and one, one thousand and two". If you reach the point sooner, the distance is too short.
Half the speedometer: the distance in metres should be at least half the speedometer reading (80 km/h → about 40 m).
In wet, snow, fog or at high speed, increase the distance considerably.