Please let me know how can I avoid dandruff?

Please see below. There will be many ways but one of them is to use selenium shampoo .
Dandruff. Dandruff is a common scalp condition in which small pieces of dry skin flake off of the scalp. If you have dark hair or you’re wearing dark colors, you may notice the flakes in your hair or on your shoulders. Dandruff may also make your scalp itch. https://www.aad.org/public/skin-hair-nails/hair-care/how-to-treat-dandruff.
Needs treatment. Dandruff is actually known as seborrheic dermatitis which not only the scalp but could also affect eyelids and other areas of your head and face. It is thought to have an association with fungal infection, also autoantibodies. It is triggered by stress, humidity, scratching, changes in weather. Responds to frequent shampooing, esp. Selenium sulfide, ketoconazole, among others. Avoid hair sprays.