How do I get hair dye

I saw that you can get hair dye in the Pokémon center in a YouTube video but it doesn’t seem to be available to buy. Do I need to do something before I can get hair dye?

You can only buy it in large pokemon centers, which are in large towns and cities. The earliest one is Suntouched City.