You can try the following solutions to fix the issue:
1. Check your internet connection.
2. Restart your PS4.
3. Activate your PS4 as your primary console.
4. Check your NAT type setting.
5. Check your PSN service status.
6. Change your DNS settings.
7. Rebuild your PS4 database.
8. Reset your modem and router.
9. Check your PS4 system software.