Following distance
The gap to the vehicle in front is your reaction time made visible. If it is too small, no amount of skill will make up for it.
Leave more than you think: your total stopping distance is the distance covered while you react PLUS the distance the brakes need, and only the second half depends on the vehicle.
Double the gap in rain, and open it wider in fog. Increase it behind a large vehicle too, because you cannot see past it.
If somebody moves into your gap, drop back and rebuild it rather than closing up. You are not losing anything you will get back later.