You should go only 3 to 4 days without washing your hair unless your hair gets dirty more quickly.
General recommendations for washing your hair says it's fine to go 3 days without washing your hair but sometimes I go as long as a week without washing my hair.
Washing your hair too often could cause your hair to dry out.
So once per week for me is good enough to keep my hair clean and healthy unless my hair gets dirty sooner.
For the average person, every other day, or every 2 to 3 days, without washing their is generally fine.
There is no blanket recommendation for washing hair.
If your hair is visibly oily, scalp is itching, or there's flaking due to dirt then you may want to wash it more often.
When you go too long without washing your scalp you can get a build-up of sebum which is hair product residue, and dead skin cells.
All of this can potentially result in clogged pores, which is not good for your scalp health or your hair health.