Thanks for the question, and welcome to Apple Support Communities.
The following article provides troubleshooting information for the symptoms you described:
Unable to access the Internet while connected to Wi-Fi
- If you are using a public or commercial network that requires a login or subscription, see this article for more information.
- Check to see if you have a self-assigned IP address:
1. Tap Settings > Wi-Fi and locate the Wi-Fi network to which you are connected. Then tap (>).
2. If your IP address is 169.254.xxx.xxx, see this article.
- If you do not have a self-assigned IP address, see if other Wi-Fi devices on your network have Internet access.
- If they do not, consult with your network administrator or ISP for further assistance.
- If they do, reset network settings on your device by tapping Settings > General > Reset > Reset Network Settings.
Note: This will reset all network settings including: previously connected Wi-Fi networks and passwords, recently used Bluetooth accessories, VPN and APN settings.