That was an interesting problem: I have a 2015 FujiXerox colour laser printer connected via USB to the USB port of an Apple AirPort Extreme. This connection gives a faster response to printing jobs than either Ethernet or Wi-Fi connections.
Yesterday I was unable to print wirelessly from either the M3 MacBook Air or the M4 Mac mini despite the two computers being able to start the printer from its dormant state. I found the problem to also be affecting the Canon inkjet printer in the bedroom.
It was a setting in System Settings-->General-->Sharing-->Printer Sharing. After turning Printer Sharing on with the MacBook Air I checked the setting on the M4 mini. It was already on but beside the toggle for that setting there was a an information indicator. Clicking on that revealed that all users on both printers had no access. that setting should have read "Can Print" instead of "No Access."