There are multiple ways to view the Wi-Fi password, but using Settings is the easiest. The Netsh utility, accessible via Command Prompt, shows passwords for all the networks you've ever connected to.
We've all been there: You need fast internet and can see a Wi-Fi network with a strong signal listed on your device, but there's a lock icon next to the network name ...