A common issue is that while many HP printers support 5Ghz wireless, in many cases, especially home level products, that 5G support is for older BCG/N+, not the new A/C standard. While they are supposed to be interchangeable, it is not reliable. Best advice is to set the 2.4 Ghz channel on your wireless router to a distinct SSID and allow the printer to only connect to the 2.4Ghz channel.
If you find the information provided useful or solves your problems, help other users find the solution easier by giving kudos and marking my post as an accepted solution. I am a volunteer, offering my knowledge to support fellow users, I do not work for HP nor speak for HP.
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".