Cause:
Perhaps a network filter or firewall is active, preventing a network connection. In my case, it was running Little Snitch In an old version. The reason could also be other network filters like Sophos, or other firewall and antivirus software. Sonoma may potentially block old plugins, thus completely blocking all network traffic. Updating this software and plugins to the latest version can provide a solution. But how can one download an update without an internet connection?
Solution:
Go to System Preferences (top left, black Apple icon) and open the Network section. There you can find 'VPN & Filter.' Simply deactivate the corresponding plugin, and your computer should be able to establish an internet connection again.