Exactly.
Nutrition, hydration, and exercise helps your hair grow as fast as your genetics is coded to allow for.
Hair, skin, and nails are the first indicators of your health.
If your routine is lacking in these areas, it slows down hair growth to accommodate for other more important bodily functions, like digestion and blood flow.
If you're healthy, your body can use the excess energy on hair growth.