Hi, I am male, 26, every time I mastubrate I lose a lot of hair & have lots of dandruff in the nest few days, this has been going on for a few months & am?

Unsure. I would suggest that you abstain and truly document that this is your problem. I would be more concerned that there is a nervous disorder making you feel the need to satisfy yourself which may be related to another problem.
This isn't the cause. All guys your age enjoy their bodies like you do, and it's good for you in spite of what anybody tells you. You're a grown, virile man and should be proud of the fact; it's not making you lose your hair. You need to manage your dandruff with a good dandruff shampoo and perhaps prescription ketoconazole shampoo as well. If hair is coming out like a dog shedding, it's telogen effluvium, get seen.