1. Check other devices on the same Wi-Fi. All of them offline? The problem is the router or internet, not the phone. Restart the router.
2. Public Wi-Fi (hotel, café): open the browser. A sign-in page may need to be accepted.
3. Forget the network and join again with the password.
4. Android: turn off Private DNS (Settings, Connections, More connection settings, Private DNS, Off or Automatic). A wrong setting blocks all internet.
5. Check the date and time are automatic. Wrong dates break secure websites.
6. Router has a device limit or MAC filter? Try turning off Private (random) Wi-Fi address for that network in its settings.
7. Still failing? Reset network settings (see our Reset Network Settings tip).