If you purchased a digital copy from Microsoft Store, you can locate your product key in your Account under Digital Content.
The product key is located inside the product packaging, on the receipt or confirmation page for a digital purchase or in a confirmation e-mail that shows you purchased Windows.