Check whether the problem affects other devices
Connect a phone to the same Wi-Fi network and temporarily disable its mobile data. Open a website to determine whether the connection works independently of your PC. If both devices fail, investigate the router or internet service before changing Windows settings.