Hyperpigmentation can be prevented by using a sunscreen with an SPF of at least 30, wearing clothes that don't let sunlight shine through and hats for blocking the sunlight. Avoid overexposure to the sun at its strongest during the day (i.e 10 am to 4 pm) and avoiding certain medications can prevent hyperpigmentation. Anyone can also prevent hyperpigmentation by quitting the habit of picking at your skin before it can fully heal. https://banish.com/blogs/article/how-to-get-rid-of-hyperpigmentation