Have you tried booting into Internet Recovery Mode using Command + Option + R to see if it can access the online macOS 10.13 High Sierra installer? Unfortunately sometimes even this key command will still launch the online installer for the OS which originally shipped with a Mac, plus it requires this Mac at some point in the past had macOS 10.12.6+ installed so the system firmware has access to the online installer.
If you can only boot to the macOS 10.7 online installer, then launch the Terminal app from the Utilities menu and use the following command to set the computer's date & time to Jan. 2, 2017 @ 11:33am:
date -u 0102113317
If the command does not produce any errors, then quit the Terminal app and select the "Reinstall macOS" or "Reinstall OS X" option. If you still have problems, then try setting the date to 2016, then 2015 since the installer has an expired certificate.
Otherwise you will need access to another Mac from 2008 to 2018 in order to create a bootable macOS USB installer using the instructions in this Apple article:
How to create a bootable installer for macOS - Apple Support
To create a bootable macOS 10.13 USB installer will require a Mac from 2010 to 2018.
To create a bootable macOS 10.11 USB installer will require a Mac from 2008 to 2015.
Here is an article which shows which versions of macOS are compatible with various Apple hardware in order to identify a Qualifying Mac. A Qualifying Mac is one which is compatible with the OS you are trying to create.
https://eshop.macsales.com/guides/Mac_OS_X_Compatibility