Welcome to HP Support Community
I would like to help
Please try these steps
First ensure the printer has the latest Firmware installed
Link: https://support.hp.com/in-en/document/c02919168
Next assign a Manual IP Address
1) Obtain the IP address of the printer – You can print a wireless configuration page to obtain the IP address.
2) Type the IP address on your web browser to obtain the printer EWS page on your computer.
3) Go to "Network" tab - General - Select "Network protocols" - Select "Enable IPv4 only" (or similar) - Apply the settings.
4) Go to the “Network” tab – Click on “Wireless (802.11) – Then click on “Network address (IPv4)
5) Click Manual IP
6) If you see a Suggest a Manual IP Address button, click Manual IP address, and the Manual IP addresses are automatically filled out for you.
7) If your page does not have a button to suggest a manual IP address, type the IP address, subnet mask, and default gateway using the numbers shown in the report you printed.
Thank you
If the information I've provided was helpful, give us some reinforcement by clicking the "Solution Accepted" on this Post and it will also help other community members with similar issue.