I have two mac's...an M1 Mini and an M4 Mini. I have a HP Deskjet connected to the M1 Mini using an actual wire. It can do wireless but it's so hit and miss and fails regularly.
The M1 prints just fine with no problems. I have shared it on the network and added it as a printer on my M4 Mini...