You may need to go where they have a faster internet connection
& download an installer or make bootable installer, (try DiskMaker X)
due to the fact you likely erased the recovery partition off the HDD.
When you can start the computer into localized Recovery (an option
from macOS Recovery, using optional keyboard shortcuts) that is a
little better than trying to gain access to online Internet Recovery.
If your ISP is slow, and/or if your wi-fi is also slower (than Ethernet)
the problem may be resolved by using a USB Flash drive (16+GB)
somewhere else and download from Apple where you can sign in
to your Apple account (previous purchases) IF you see the older
Mavericks 10.9 system available, from your purchases list.
• OS X: About Recovery Disk Assistant - Apple Support
This tells of how to use another method to install if your Mac no
longer has recovery partition on its drive; in more words than this.
And this may be too much trouble, see the following for more info.
{..If you have newer Mac you could use Internet Recovery to start up
from Internet-based version of Recovery system (online). This can
be more convenient than using the utility in the main article above.
You could also install create a bootable OS X installer in OS X 10.9
Mavericks or OS X 10.10 Yosemite (or El Capitan)..}
Installation options are explained in the macOS Recovery (read links)
one of which takes you here: •How to reinstall macOS - Apple Support
{macOS Recovery can install one of several options, proceed carefully}
• About macOS Recovery - Apple Support
IF you cannot get the Mavericks 10.9(.5) system to download or install
the problem may be with that file, if nothing else is wrong. [You may
then have to consider El Capitan 10.11.6 download instead.] This is a
better system and the link to get it is inside a Support article.
• How to download OS X El Capitan - Apple Support
You may not have needed to totally erase the HDD, unless replacement
or total reformat to try & repair file damages. A recovery partition was
installed on the original drive and it had installation features now missing.
Sorry to not be very good at this; I've only used online installers a few times.
Most of my experience has been with backup DVD or other local media and
also using full system clones on local backup bootable drives to restore Macs.
Good luck & happy trails! 🙂