This is a typical issue, which can be resolved by following these steps:
Check the status of the network connection.
Check to see if you are connected to the right network, if it is disconnected or if there is an issue with it.Check any network settings.
Go through your network settings and check them to make sure that everything is configured as it should be.Restart your router and modem.
Disconnect and reconnect your router and modem to refresh your network connection.Edit your DNS settings.
Go to your DNS server settings and change them if required.