Know that you can only treat dandruff, not cure it.
The most advocated treatment is using shampoo more often, and anti-dandruff / anti-fungal shampoo in particular, which stops the clumps of dead skin from forming, and the fungus that contributes to dandruff, respectively.
If that doesn’t help after about a month of use, or you have more harmful symptoms, such as rashes and swelling, go see a doctor, and a dermatologist in particular.
A cure doesn’t exist and is unlikely to be found, as there’s multiple causes and they’re hard to affect. The main causes seem to be your genes, and some scalp fungus, but there’s also your environment and mental state that can change the state of your scalp, making dandruff easier to form.
It’s more like cavities and gingivitis. They’re caused by bacteria that are always present. You work constantly to slow it to the point where it basically stops. You can’t cure it, you just keep treating it.
It’s not just a dry scalp.
The difference between dandruff and a dry scalp, is that a dry scalp doesn’t produce the clusters of dead skin that define dandruff. But a dry scalp does make your hair dry and easier to damage.