Welcome to the HP Support Community. I'd be happy to assist you with the "cannot connect printer" issue.
To better assist you - What is the status of the wireless light on the printer, steady or blinking?
Meanwhile, try and print network test report and share the results-
HP printers with a control panel menu: Open the Wireless menu, touch the Setup icon , touch Print Reports, and then touch Wireless Test Report
And you may also try and delete the printer and add it back with appropriate options.
1.) Click the Apple menu, click System Preferences, and then click Print & Scan or Printers & Scanners.
2.) Check if your printer name displays in the Printers list, If your printer is listed, click the printer name, click the minus sign to delete the printer.
3.) If you see multiple printer queues for the same printer, remove all extra printers by selecting them one at a time, and then clicking the minus button at the bottom of the list.
4.) Click the plus sign click Add Printer or Scanner, click the printer name.
NOTE: Make sure that the printer kind is Bonjour or Bonjour Multifunction, or USB.
5.) Click the Use or Print Using menu, select AirPrint in the pop-up menu. Then click Add. Select AirPrint from the Use menu
6.) Try to print.
Hope this helps! Keep me posted.
Please click “Accept as 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!
Have a great day!
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".