The short and somewhat obvious answer is that your device probably hadn't connected to a network before the check was made.
Or if you're using an always-on VPN with killswitch enabled, maybe this check is happening before the VPN has started.
If you are eventually able to check for updates successfully, maybe you just want to disable this notification (or rather make it silent or otherwise less annoying - so you still will eventually know if you really aren't able to get updates).