Perform an Internet connection test by selecting Settings > Network > Test Internet Connection.
Turn off your router, wait at least 5 minutes, then restart it.
If you are using a wireless connection, try bringing your PS5™ console closer to your router and removing anything interrupting the connection between the devices.