Hairloss is mainly genetic, but there are certain foods which causes insulin to surge and DHT to be released. Things such as bread, pasta, grains, refined carbs etc. Mostly the western style diet, which is shit, any processed food also, including junk food.
Whey protein seems fine, but grass fed animals are better than grain fed animals, but mostly grain fed in the west because it's more economical.
I've found some guys shed when lifting weights and drinking protein shakes, one way round it is to buy Spiro cream and apply to the scalp before working out, i've read that this works, although I don't shed from exercise or drinking protein shakes, so no need to try it out.
I think there is a question over whether its the protein shake making you shed or the testosterone spike from an intense work out. My money is on the testosterone spike. Could be wrong, this is my opinion.