Expanding upon stedman1’s factual statement…
The iPad Air5 only supports the second generation Pencil. The first and second generation Pencil use an entirely different pairing and charging interface; Pencil’s are not interchangeable.
The second generation Pencil can only be used with iPad models that have the magnetic/inductive dock that is exclusively designed for the Pencil. Charging and pairing is controlled via the iPad magnetic.
By contrast, the first generation Apple Pencil uses the physical Lightning port of the Pencil and host iPad for both pairing and charging. The first generation Pencil can also be charged using an inline charging adapter and the iPad’s Power Adapter. This pencil can only be used with compatible iPad models that have a Lightning connector; recent models of iPad that feature a USB-C port lack any means by which to pair with a first generation Pencil.
In summary, the Apple Pencil models are not interchangeable - and can only be used with the iPad that has appropriate internal hardware.
Here is the definitive compatibility list for Apple Pencil and iPad:
Apple Pencil compatibility - Apple Support