Depending on your situation, you may want to see a dermatologist and they’ll often prescribe over-the-counter medication like topical retinoids, azelaic acid, or koji acid; for quicker results, they might recommend you get a laser peel or IPL therapy. The best way to prevent hyperpigmentation is to apply SPF 30 or higher daily, and consider laser hair removal to prevent ingrown hair scarring.