How to nourish the hair?

If we compare our hair with a forest, and each hair with a tree, it would be easy to understand that nothing we do externally for our hair will be enough, if at the same time we do not take care of