I had problems printing and scanning from my MacOS laptop to a HP Officejet Pro 8620. I ended up fixing it by turning off IPv6 on the printer and the MacBook.

But it appears that you can have IPv6 turned on and it still work. Please see below

Firstly I think you need a WiFi Router that can respond to DHCP IPv6 requests. I have a TELSTRA SMART MODEMTM GEN 2 Modem Make Model Technicolor DJA0231. And looking at the DHCP settings for IPv6 it is set to respond to IPv6 DHCP_REQUESTS

The next thing is go into the printer and enable IPv6 again and it should talk to your IPv6 compatible WiFi Modem and get an IPv6 address

Finally as the comment on previous post mentioned go into your MacBook WiFi network settings by clicking Open Network Preferences, Selecting your WiFi connection and choosing the Advanced … button and then clicking the TCP tab and next to IPv6 choosing to configure IPv6 Automatically. It will then get an IPv6 address from your IPv6 WiFi Router and your Router, Laptop and Printer will be able to communicate with each other.

Link-Local Only Might Work Too

IPv6 also auto-configures link-local addresses (which start with fe80) and it may only be needed to turn on link-local only on your Mac in Wi-Fi network preferenece and it may automagically work if the printer and macbook are on the same network. But I haven’t tested this.

Configure Printer to support both IPv4 and IPv6

Make sure your WiFi router has IPv6 support and is serving IPv6 addresses

Change your Wi-Fi network preference to get an IPv6 Address