To reset your MBA to its original factory condition, follow these instructions: What to do before you sell, give away, or trade in your Mac - Apple Support.
The conundrum you face is addressed deep within the link provided in Step 7. How to erase a disk for Mac explains that you need to choose Show All Devices from the View dropdown button and select the topmost device—not a volume or container. The reason is that macOS versions prior to Mojave do not recognize APFS formatted volumes or containers, and if you were to try to install your Mac's originally installed operating system it would not recognize its storage volume at all.
When erasing that device, choose GUID Partition Map and a Mac OS Extended (Journaled) format.
Then, you will be able to install macOS on that disk. Choose the startup key chord corresponding with Reinstall the macOS that came with your Mac, or the closest version still available.