I think the bug "cannot connect to server" happens because High Sierra is already a very old software and I think that Apple has already shut down the servers for the High Sierra Mac App Store, which means that you need to download the software installer from another source (which may be insecure, if you are not downloading it from a "safe"/"trustable" source, like the Mac App Store). On a more recent Mac (Intel based Mac), you could download, for example, the macOS Catalina installer from the App Store (Catalina 10.15) and, after that, on that Mac, you could create a bootable drive with it (How to create a bootable installer for macOS); macOS Catalina is natively compatible with the 2012 MacBook Air, however, if you find it a little heavier, you can try Mojave (Mojave 10.14).