“Turn it on and off again” might be a tired cliché about IT support, but the truth is that this can solve a host of temporary network connectivity issues, so it should be your first response to problems that aren’t going away on their own. Rebooting any devices having connection issues is a response, but you should do the same for any modems and routers. Unplug your modem and router and leave it for 60 seconds. Then plug your modem back in, wait for it to be boot up, and connect your router to it.
If other devices are able to effectively connect to the network but your system still isn’t, it’s a sign that this is where the problem lies.