The reason it takes different lengths of time for different habits
The often-quoted single figure for forming a habit does not survive measurement. Observed times range from weeks to most of a year depending on the behaviour.
There is no single formation period. Complexity sets the curve, and the widely quoted figure is a median with its range removed.