In general, it is recommended to wash the hair 2-3 times a week to maintain a healthy scalp and avoid drying out the hair. Washing your hair too often can strip your hair of the natural oils that are needed to keep it healthy and shiny. On the other hand, washing your hair too infrequently can lead to a build-up of sebum and dirt, which can block the hair follicles and cause scalp problems. If you have very oily hair, or if you exercise regularly and sweat a lot, you may need to wash your hair more often than 2-3 times a week to keep it clean and fresh. It is important to listen to your body's needs and adjust your hair washing routine accordingly. If you feel that your hair needs to be washed more or less often, adjust your hair washing routine accordingly. And also remember to avoid using too hot water and avoid rubbing and twisting the hair too much when you wash it.
So in short, there is no set rule for how often you should wash your hair. It depends on your hair type and lifestyle, so make sure you find the best routine for you and your hair and you will achieve beautiful and healthy hair.