The thing is, when the PC prints and the smartphone doesn't, the problem is almost always in the app or your phone's cache, not in the printer itself. First try clearing the cache of the app you use for printing (go to your phone's settings, apps, then that specific app, storage, and clear cache). If you're using the HP Smart app, uninstall it and reinstall it from scratch. That often does the trick.
If it still doesn't work after that, restart both your phone and the printer. Then make sure your phone is actually on the same wifi network as the printer - it sounds obvious but sometimes your smartphone connects to a different band (2.4 GHz vs 5 GHz) and the printer becomes unreachable. Check your phone's wifi settings to see which band you're connected to and if needed, temporarily disable 5 GHz to force it onto 2.4.
One last thing: on the HP Envy 6420 you can also reset the wifi module from the printer itself (usually in the network settings menu, there's a reset option). If you've tried all this and it still doesn't work, it could be that the printer has "forgotten" your phone in its authorized devices - in that case you need to re-add the printer from your phone's wifi settings like it's the first time.