The "Cannot connect to Wi-Fi network" error message indicates that the problem is on your end (rather than with the PS5 servers). It doesn't necessarily mean that your internet is down, just that the console can't connect to your wireless router. This article explains what's happening and how to fix it.
The following issues can cause this PS5 error:
There are other errors you may see that are related to internet issues. For example, if you get a message that your PS5 can’t connect to the server, it could be that the service you’re trying to access is down.
Follow these steps until your PS5 can connect to Wi-Fi: