Do you want to keep the Boot Camp Partition? If you do, run internet restore with a thunderbolt ethernet adapter to your modem.
The only MacBook Air that can install Sonoma are (the Machine ID in the system profiler x,y minimum MacOS):
- MacBook Air 2018 and later 8,1 Mac OS 10.14 Mojave
You can read the serial number with a magnifying glass from the under side of the Mac and plug it in https://checkcoverage.apple.com/
This will give you the age of the computer.
If you erased your hard drive of Mac OS after installing Windows, you will need to use Internet Restore to install the Mac OS that came with the Mac, and use Disk Utility to add an HFS Extended GUID or APFS partition.
From there you can install the latest OS that your Mac supports.
If you still have Mac OS recovery partition on your Mac, you can just command-R run restore, and install it on a similarly formatted partition. Only erase your Boot Camp partition if you no longer desire any of your Windows data.
Option key lets you toggle between Windows and Mac OS boot partitions at startup.