There is really no right answer to this. It really depends on the individual, their hair type (curly hair does not become greasy quick), grooming habits, and natural oil production.
What are the pros and cons of washing hair?
You must wash your scalp to avoid scalp health issues and irritations such as dandruff. People with oily scalps should wash their hair more often like 2-3 times a week. We should wash our hair because of the styling products we use.
The surfactants or the cleaning agents present in the shampoo can really damage the hair lengths. The roots of your hair near the scalp are coated with sebum and this needs to be removed in time, but the hair lengths are probably not covered with sebum and only need less wash.
The hair also contains intercellular lipids or fats that form a barrier to prevent the penetration of foreign matter and loss of moisture. The intercellular lipids that are removed upon shampooing will be replenished but the internal lipids, which are not derived from sebum, can be removed from the hair during repeated washing with high cleansing detergents and this will leave the hair vulnerable to damage.
Shampoos cannot distinguish those intercellular lipids from sebum fat and will remove them both.
You can counteract this by focusing on washing the hair near the scalp and not the lengths. You can also a bit of coconut oil on the lengths for protection.
Note: if you have an oily scalp, and you would like to wash it often, avoid shampoos with harsh surfactants. Go for shampoos with mild surfactants to avoid dryness of the scalp.