Hello,
If the printer's LCD screen shows an E4 error, this has nothing to do with Windows. It indicates something wrong directly on the printer itself. I looked up HP's knowledge base and E4 on their models can mean paper jam. https://support.hp.com/us-en/document/ish_6246550-6246594-16
Please use their guidance to troubleshoot, otherwise you would need to reach out to HP support instead. This is not something you can solve from Windows.
Note: This is not Microsoft website/URL, but it is the official OEM/manufacturer site.