You are in an HP Printer Offline Windows 10 state because the printer is unable to communicate with the system.
You can refer to these steps to get your printer in an online state:
You need to see if the printer is turned on and connected to the same WIFI network as that of your laptop. You will be able to see the network that your system is associated with on the printer’s built-in menu
You can also check if the ‘Use printer offline’ mode is started or not. For this, you need to open the settings and select ‘Devices’ and then click on ‘Printers and scanners’. Choose the printer and then navigate to the option that says ‘Open queue’. Ensure that the ‘Use printer offline’ is not selected.