Hi
Looks like you are prompted to enter the EWS password. Try a network restore to restore the password -
Network Restore - Press the Wireless button and the Cancel button from the printer control panel at the same time, and then hold them for three seconds.
If the router has a WPS push button, try these steps -
1) Press and hold the Wireless button on the printer for more than three seconds to start WPS push mode. The Wireless light starts blinking.
2) Press the WPS button on your router.
NOTE: THE MOMENT YOU PRESS THE WIRELESS BUTTON ON YOUR PRINTER, WITHIN 30 SECONDS YOU SHOULD PRESS THE WPS BUTTON ON THE ROUTER.
If this step is not successful, then we need to first connect the printer to a computer using a USB and then convert the wired connection to wireless as the printer does not have a control panel to enter the Wi-Fi password.
You may refer to this document for steps - HP Printers - Changing from a USB to a Wireless Connection
You may also connect the printer using your mobile devices -
How To Set Up a Wireless HP Printer from Android?
How to Set Up a Wireless HP Printer from an iPad or iPhone?
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!