Did you create a bootable USB installer before you erased your mac?
How did you erase your mac?
Relying on Apples Recovery Servers to reinstall an OS is not really recommended.
Restart your mac to your Recovery HD by pressing and holding down the Command and R keys.
After a few minutes you will reboot to the Recovery HD.
You should see a Utilities panel.
Select Disk Utility and press Continue.
Highlight the Disk in the left hand panel and then click on the Erase button.
Give the Disk a name.
Format: Mac OS Extended (Journaled)
Scheme: GUID Partition Map
Click Erase.
When Done quit Disk Utility.
Now to reinstall from the Apple Recovery Servers.
The certificates for several of Apples OS's expired in October 2019, Apple have been very poor at getting these updated on
their Recovery Servers with valid certificates.
This may be the problem you are experiencing.
Try this workaround, we are going to set the time and date on your mac to a date previous to the expiry date of the certificates.
Connect your mac to your router via cable, not WiFi
Boot to your Recovery HD, click on Utilities in the menubar select Terminal.
Make sure WiFi is switched off, it can reset the date back to today.
Enter a new date, for example or just copy and paste
sudo date -u 011421002017
press Return
enter your password
press Return
If Terminal returns an error saying sudo : command not found, then try again without sudo.
just enter
date -u 011421002017
press Return
You won't be prompted for a Password if you did not need to use sudo
Once the date has changed you can quit Terminal.
Now try downloading the OS.
Click on Install OS X, press Continue.
If this works then when the OS is installed and booted up you can Open System Preferences> Date & Time
and reset the time back to today.