The Safari version incorporated in OS X 10.7 "Lion" will not connect to most websites. It won't connect to the App Store, iTunes, or anything else that requires connections using recent encryption and security protocols.
You can upgrade that MacBook Air to High Sierra, but it will still have trouble with many websites.
How to download and install macOS - Apple Support explains how to use a web browser to download and install a later macOS version... but you may have trouble loading even that page with that Mac's version of Safari. If that happens try this direct download link:
http://updates-http.cdn-apple.com/2019/cert/061-41424-20191024-218af9ec-cf50-4516-9011-228c78eda3d2/InstallMacOSX.dmg
That will download an image file, which you can open and use to subsequently install El Capitan; an interim step that may be required prior to installing High Sierra. It has been a long time since I worked with a Lion system so that may or may not still be a prerequisite. El Capitan will install the App Store, which you can then use to install High Sierra directly.
Or, use the following link, which will automatically redirect to the App Store (copy and paste it):
macappstores://apps.apple.com/app/macos-high-sierra/id1246284741?mt=12
Let us know how far you get.

To avoid getting yourself into a situation in which recovery becomes difficult, always create a Time Machine backup prior to doing anything you might regret.
Back up your Mac with Time Machine - Apple Support
Even better, create a "bootable USB installer" that you can use to reinstall macOS even without an Internet connection:
Create a bootable installer for macOS - Apple Support