Do you have access to a second Mac? If you do the easiest way is to get the OS installer downloaded from that system and then prep up a USB thumb drive with the OS and the use that drive to boot up your system to install the OS.
So thats the basic idea but now what is the OS we should install Mountain Lion is not the best choice for your system any more. The best choice is to get to a newer release, I would go with Sierra (1012.x) as its still HFS+ based anything newer will alter your system to APFS. While it has some advantages, it doesn’t work well on SATA/mSATA based systems as the SATA interface buffers can’t handle the heaver chatty protocol of APFS as well.
As a side note your system could run the latest version of macOS Big Sur 11.5 but your systems limited RAM and storage make it very iffy. Which is why sticking with Sierra is the better version.
So here’s when you can down load Sierra How to get old versions of macOS. Format the 32GB thumb drive GUID with Journaled file system, then follow this guide How to create a bootable macOS Sierra installer drive
Now using this Bootable OS installer boot up your MAcBook Air with it, format your internal SSD like you did with the thumb drive and then let the installer run!
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
1