i tend to use a gentle, usually quite fatty soap bar to wash my hair every few days but one thing that for sure helps the condition more than anything is foods high in stearic acid, like pure chocolate or higher fat cacao powder and beef and beef fat.
it's not just the shampoo garbage that fucks people's hair up and makes the meme fuzzy crazy hair in middle age it's the carbohydrates too, which just generally reduce skin oil production. and probably rapeseed oil and other seed oil garbage, that is quite rancid, also tends to degrade the quality of skin oils that end up in the hair.
i'm growing my hair out long and i can report that as a late 40s person i have hair that looks as good as it did in my late 20s now after a week or so of frequent cacao consumption.