that error can occur when your internet connection isn't sufficient for a macOS download. please see If your Mac starts up to error -1008F - Apple Support.
as well, are you attempting the download over wi-fi? when possible, you should perform macOS downloads with a wired ethernet connection. if this is not possible, (mac has no ethernet port) you should move the mac as close as possible to the router, and temporarily remove your other devices from the wi-fi. you need the most bandwidth going to the mac as you can get while downloading a macOS.