Different types of pigmentation:

Excess sun exposure
Sun exposure is the major cause of hyperpigmentation as sunlight triggers the production of melanin.
Melanin is produced in a way to protect the skin from harmful UV rays but as a result produces dark spots, freckles & tan.

Hormonal changes/ influence
Hormonal influences are another cause of hyperpigmentation & are known as melasma or chloasma.
It is more common in women & occurs when female sex hormones, estrogen, and progesterone stimulate the overproduction of melanin when exposed to the sun.

☀️ Acne & pimples
As a result of acne, skin produces more melanin to protect itself from the harm that will be caused by acne
This leaves dark spots/ acne marks in the area of acne/ pimple.

? Age & Sun
With age, number of melanin producing pigments reduce & hence the remaining pigments become overactive.
When this is aided with sun exposure, there is an excess production of melanin.

☀️ Wound/ rash marks
As a result of any wounds/ rashes, the skin produces more melanin to protect itself from the harm that will be caused by the wound. This leaves dark spots/ marks in the area of the rash/ wound.

https://www.thedeconstruct.in/product/brightening-serum-10-niacinamide-0-3-alpha-arbutin/
https://www.thedeconstruct.in/product/exfoliating-serum-18-aha-2-bha-15ml/