The short answer
There is no universal answer, but most people wash more often than they need to. The useful move is to extend the gap gradually rather than to stop suddenly.
- Oily scalp, fine hair: often, possibly daily, and that is fine.
- Dry, curly or coarse hair: much less often, sometimes weekly.
- To extend the gap, add a day at a time over a few weeks rather than all at once.
- Wash the scalp, condition the ends. That is where the oil and where the dryness are.
- Rinse thoroughly. Product residue is a common cause of hair looking limp and dull.
What will ruin it
The idea that the scalp "rebalances" after a period of not washing is not well supported. If your scalp is oily, it will keep being oily, and there is nothing wrong with washing it.
Why it works
Sebum is produced at the scalp and travels down the shaft. The natural interval depends on how much you produce and how easily it travels, which is why straight fine hair looks greasy sooner than curly hair does.
This is general information, not medical advice, and it does not replace a GP, a pharmacist or NHS 111. Call 999 in an emergency. Full disclaimer.