Refer to the document Connect to a Wireless HP Printer for help. If the printer is on network and you're unable to print from the computer, we can isolate the issue further.
To be able to assist you better, I would like to know the following:
Are the printer and PC connected to the same network?
Is your router dual-band enabled i.e., both 2.4GHz and 5GHz?
What is the distance between the router and the printer?
Is there any antivirus software installed on your computer?
Could you perform a ping test using the Mac Network Utility and let me know the results?
Use the printer IP address to perform a ping test, the printer IP can be located by selecting the wireless icon on the printer display.
The wireless status menu on your Mac should also give us quite a lot of information that would help us identify the issue. You can press and hold option-click the WiFi icon and then use shift-command-5 to take the screenshot. Press the space bar when the icon turns into a camera. Share the ping test results and the screenshot with us.
Also, check with your Internet service provider if your router is able to forward 'Bonjour packets'.
Bonjour locates devices such as printers, other computers, and the services that those devices offer on a local network using multicast Domain Name System (mDNS) service records. The software comes built-in with Apple's macOS and iOS operating systems.
Keep me posted for further assistance.
Please click “Accepted Solution” if you feel my post solved your issue, it will help others find the solution. Click the “Kudos/Thumbs Up" on the bottom right to say “Thanks” for helping!
Be alert for scammers posting fake support phone numbers and/or email addresses on the community. If you think you have received a fake HP Support message, please report it to us by clicking on "Flag Post".