Previously installed printer drivers will generally continue to work on a Mac whose operating system has been upgraded, which explains the reason your MBA continues to work.
However, if you set up a new Mac as a new Mac (that is, without migrating its content from a previous one) you will need to obtain and install new printer drivers. That's when you find out your favorite printer manufacturer abandoned support for it.
Apple no longer supports anything other than AirPrint-enabled printers and multifunction devices, and I can't find that one on Apple's website About AirPrint - Apple Support. If you did not install it that way, remove the existing entry in Printers & Scanners and add it again, this time being sure to specify AirPrint. Refer to this Apple Support document: Connect an AirPrint printer to a Wi-Fi network.
If it does not appear as an AirPrint device it's not necessarily the end of the world. Try this HP "Easy Start" app: https://support.hp.com/us-en/drivers/selfservice/hp-officejet-5200-all-in-one-printer-series/14095737
Despite HP's claims I know of at least one recent Discussion on this site that it just doesn't work. Try it first, then if you still have trouble please write back. My next idea would be to erase your new Mac and set it up again, this time electing to transfer your information from another Mac, with the MBA as its source. That might take its existing and functional printer drivers along with it.