DIAGNOSIS The printer's wireless radio is conflicting with a common router setting. Most often, it's the Wi-Fi channel or band selection.
FIX Temporarily change your router's 2.4 GHz Wi-Fi channel to a static channel between 1 and 11. Avoid Auto or channels 12-13. Also, ensure your network is not using a 5 GHz-only mode for setup, as this printer only uses 2.4 GHz. Run the wireless setup on the printer again after making the router change.
IF THAT DIDN'T WORK Use a USB cable for initial setup and driver installation. The HP Smart app can often push the correct network settings to the printer over USB, bypassing the touchscreen setup.
HEADS UP WPS push-button connection is often unreliable with this model. Use the standard method where you select your network name and enter the password on the printer screen.