As mentioned by Tallman, the internet is working on a device by connecting it with the active WiFi network or mobile data.
Do you have an active WiFi internet connection or mobile data? If yes, please perform the reset network settings on your device and check if it works fine.
Go to Settings > General management >Reset> Reset network settings> Reset settings.
This will reset all network settings, including those for Wi-Fi, Mobile Data, Bluetooth
Then, follow the steps below to connect with the WiFi connection.
Go to settings> Connections> Wifi> Activate > Select a WiFi network as per your wish in the Available networks list and follow the on-screen instructions.
When connecting make sure the devices are within 10-15 meters of each other.
Thank you Tallman for your information.