Agree with Timira BUT can't assume online is the only reason. In RSA we have seen the growth of beauty specialists and spas. Our informal economy could also be distorting the sales figures. I would ask if the traditional retail outlets are providing the products that people want. RSA lags the rest of the world in online purchase so I would look for other causes.
Also define cosmetics. Are you thinking of skin care? Make-up? Hair care? Need to do some exploratory research to see if can pick up consumer needs and buying trends. The stats available on the internet suggest that the market is growing.
Did you see the Nielsen analysis on the future of beauty at https://www.nielsen.com/content/dam/nielsenglobal/de/images/WP-CH/Nielsen_2018_the-future-of-beauty-report.pdf ?
There could be diverse reasons, from the quality of the product the service levels, price , competition etc., the study should be carried out from customers what are the possible factors.