If your PS4 is having trouble connecting to the internet, you might want to narrow down where the problem is right away by determining if the issue is with your PS4 or with your Wi-Fi network.
1. Check to see if other devices on your home network, like computers and tablets, can connect.
2. You should also make sure that devices on the same kind of connection are working — for example, if your PS4 is connected to the router with a wired Ethernet cable, then plug a computer into the router as well. If the PS4 is using Wi-Fi, connect to Wi-Fi with your phone and see if it works.
3. If your other devices can't connect either, it's time to power off your modem and router, wait several minutes, and turn them back on. If that still doesn't work, contact your internet service provider for help.