Hi,
Thank you for the printer model information. The HP Photosmart 5522 e-All-In-One Printer is listed in About AirPrint - Apple Support as a model with support for the driverless AirPrint technology. Normally, the MacBook Air, the iPhone and the printer would be connected to the same Wi-Fi network (router). The Internet connection would be via the router.
In the alternative case, where there is not any Wi-Fi, you may want to investigate whether it is possible to use the printer connected by USB to the MacBook Air. However, this would require drivers for the Mac, which may or may not work. Are you using macOS 11.3 (as indicated by your profile)?
https://support.hp.com/us-en/drivers/selfservice/hp-photosmart-5520-e-all-in-one-printer-series/5157533/model/5218819
Another way would be to set up a local Wi-Fi network using a small "travel router". The TP-Link TL-WR902AC is merely one example without built-in mobile broadband capabilities. Personal routers from other manufacturers with built-in 4G or 5G mobile broadband are available as well.
A local travel router Wi-Fi network could allow you to still use AirPrint, thus not having to install additional drivers for the MacBook Air.
How do you intend to set up the iPhone mobile data connection (Personal Hotspot) to the computer? Wi-Fi, Bluetooth, or USB?
How to set up a Personal Hotspot on your iPhone or iPad - Apple Support
Do you want to print from the iPhone while being connected to the Internet, or only from the MacBook Air?