<< CANNOT CONNECT TO SERVER >>
that misleading message should read,
"when presented with the Mac serial number and Apple-ID you proffered, the server declined to provide any downloads"
MacOS is not copy protected in the usual way. Instead, when you "purchase" a version newer that the 'ships-in-the-box' version, your copy is tagged with your Apple-ID. if you have not 'purchased' such a copy, or your Apple-ID cannot be determined, none will be sent to you.
this can happen after you erase your boot drive, because that is where the Apple-ID would be stored.
Your recourse is to download the 'ships-in-the-box' version, then using MacOS itself, upgrade to a later version.
On an Intel-based Mac, if you use Shift-Option-Command-R during startup, you might be offered the macOS that came with your Mac, or the closest version still available.
from:
How to reinstall macOS - Apple Support