Go to Settings > Update & Security > Troubleshoot > Additional troubleshooters > Internet Connections option > run the troubleshooter
By going through these steps, Windows will automatically check the problem and identify its cause, and you can fix your problem.