Hi,
If the 5.1 driver package from HP's support page for the P1102W does not work, there is an updated HP 5.1.1 Printer Software Update download from Apple. It is true that the System Requirements for the latter download say macOS 10.14 and Not compatible with macOS v12 and newer, but reports have indicated successful use for a few other models anyway (at least with some earlier macOS 12 versions). So, something like the HP LaserJet Professional P1100w driver (6.9) mentioned in Printer and scanner drivers for Mac - Apple Support could perhaps be worth a try. It may or may not work/install in this case. Look upon it as an experiment. Make sure that you have backup copies of all important files (documents, photos, et cetera) before testing anything.
A printing system reset may be needed.
Reset the printing system on your Mac to solve a problem – Apple Support (UK)
Add a printer to your printer list so you can use it on Mac – Apple Support (UK)
The HP LaserJet P1102w is not mentioned in About AirPrint - Apple Support (US edition, June 24, 2022). However, an HP LaserJet P1102w Printer was listed as an AirPrint-supported model in an old (February 13. 2012) iOS: AirPrint 101 Apple article (HT4356). Possibly an early firmware/AirPrint version? A firmware update may be required. There have been printer firmware updates made available via the HP download pages for the HP LaserJet P1102w Printer (but these files will be shown only if macOS 10.14 or earlier is selected).
If the driverless AirPrint technology would work properly with this printer, one should not have to install drivers from the manufacturer, provided that the printer and the MacBook Air are connected to the same network (Wi-Fi router).
For a USB connection, drivers would be needed.
If necessary, you could also use an iPhone/iPad to test a printer's AirPrint capabilities.
Use AirPrint to print from your iPhone, iPad, or iPod touch - Apple Support