Phone won't connect to Wi-Fi or the internet
Don't worry, this is one of the most common phone problems, and a few simple checks fix it most of the time.
What to do
Step 1: Swipe down from the top of the screen to open the quick settings. Make sure Airplane mode is off and Wi-Fi is on.
Step 2: Check whether other devices in your home can get online. If none can, unplug your router, wait 30 seconds, plug it back in, and wait a few minutes.
Step 3: Restart your phone.
Step 4: Open Settings, find Wi-Fi (under Network & internet or Connections), tap your network or its gear icon, and tap Forget. Then tap the network again and type the Wi-Fi password.
Step 5: If Wi-Fi isn't the problem, check that Mobile data is turned on in the quick settings.
Step 6: Still nothing? Try resetting network settings (see the related answer). It won't delete photos or apps.
Still stuck? If no device in your home can get online, contact your internet provider; if only your phone can't, contact your carrier or the phone maker's support.