Two Second Rule is the minimum following distance.
Longer if momentum is greater such as carrying a heavy load.
Not too much of a gap, otherwise others may constantly fill the gap. If a gap is filled, then slowly let the gap increase again, all the while keeping an eye on the vehicle ahead until you have a safe buffer zone.
The closer the gap, the more focused, and less distracted your concentration needs to be.
The worse the road surface, the longer the gap.
The more restricted the view ahead, the longer the gap should be.
If lane is congested, the bigger the gap should be because of the danger of a multiple car pile-up
Where there is the danger from the rear, such as a driver on their cellphone, then try to control the space in front of you to be able to keep a minimum distance from the vehicle behind.