HP users can Download HP PC Hardware Diagnostics Menu and install it. You can also use UEFI Hardware Diagnostics Menu by the manufacturer of your system e.g. Moreover, many manufacturers have given touchscreen tests in their BIOS which can be used to check the functioning of the touch screen. If you can use the touch screen in the BIOS, then it is a software issue and if you cannot use the touchscreen in the BIOS, then it is a Hardware issue. Now in the BIOS try to use the touch screen. Boot or reboot the system, and access the BIOS screen (normally you can access it by pressing F10 when the system is booting).
The best way to identify if it is a hardware or a software issue is to check if the Touch is working on the system’s BIOS screen.