Egyptian shepherds made sunscreen from crushed castor beans in 780013.c.
Today, the main ingredients in sunscreens are usually aromatic molecules conjugated with carbonyl groups whichabsorb high-energy ultraviolet rays.
Sunscreens also block UV-B rays, and if used often enough, this can cause a deficiency of vitamin D.
Get some sun, but not too much, is the general advice of the day.