PCIe SSD swap from MacBook Air 2016 to newer model
Solution 1:
The current MacBook Air generation is the early 2015 model. I’m assuming yours is this model but you should enter your serial number from the bottom case on Apple’s warranty lookup to be certain of it before you proceed.
Accessing the drive is simple and documented by iFixit. In short: have a MacBook screwdriver set handy, open the rear case making sure not to mix up the two shorter screws near the display, disconnect the battery, and remove or insert the SSD by unscrewing it and pulling it up and out of the socket at a slight angle.
If you were to buy a new MacBook Air of the same model, the SSD can be swapped. macOS does support booting a drive from one Mac in another Mac. Be aware that the SSDs use a proprietary connector that has changed often between generations and even between different product lines released in the same year. Other Macs such as MacBook Pro 2016/2017 and MacBook (12”) don’t provide the capability to swap drives at all as it’s integrated with the motherboard.
Regardless of the new Mac you choose, you’re better off attaching both drives and copying data over to the new one. There are adapters from Apple’s proprietary formats to the standardised m.2 format, so you can buy an m.2 USB adapter and another adapter for the SSD.
Consider selling the old laptop to someone who could make use of it for parts, e.g. a local repair store or on eBay as “for parts”, and dispose of the old drive when you're certain you're done with it.