Did you check for any HP Articles that has the solution you are looking for?
Did you restart the computer, printer, and router to establish a fresh connections?
While you respond to that, here's what you need to do:
Step 1: Restart the computer, printer, and router
Restart the computer, printer, and router to resolve any network or communication error states.
The following steps temporarily disconnect network and Internet connections, and require restarting your computer. Complete any tasks or downloads in progress before continuing.
Disconnect the power cord from the router.
Turn off the printer.
Close all running programs on your computer, including the HP software installation window, then shut down the computer.
Reconnect the power cord to the router, then wait for the Internet activity light to display a normal connected status.
Turn on the printer.
Turn on the computer.
Try installing the HP software again.
If the printer is found during the installation, the issue is resolved.
If the printer is not found during the installation, continue to the next step.
Step 2: Check the network and printer connection status
Make sure your network is working correctly and that the printer is ready for the network setup.
If you are using a wireless router, check your router’s documentation or support site to make sure it meets the following requirements:
Check the router band: Many routers can operate in both 2.4 GHz and 5.0 GHz frequency bands, but not all HP printers support both bands. Make sure the 2.4 GHz router band is enabled and broadcasting. If the router broadcasts separate network names (SSIDs) for each band, connect the printer to the 2.4 GHz band SSID.