People of all ages are prone to get dandruff, and we're constantly bombarded with ads for things to treat that, too.
Unfortunately, the products that supposedly cure those conditions often make them worse. (Maybe that's how the manufacturers and advertisers stay in business.)
Both conditions can be caused or aggravated by sensitivities to the chemicals in the soaps, shampoos, creams, etc. intended to treat them. Makeup that's used to conceal zits can make them worse for the same reasons. Sulfur and related chemicals and fragrances are frequent offenders, but others can be a problem for some people.
And serious acne in anyone with a tendency to have allergies can often be a result of eating certain foods. That's probably why long ago people thought chocolate caused acne; in people allergic to chocolate it actually does.
For anyone with dandruff or acne it's a good idea to read labels and try switching to fragrance free personal care products with as few chemicals as possible. And I hope anyone with serious acne and a family history of allergies of any sort will talk to a health practitioner about an elimination diet, which can reveal foods causing that reaction.