Hi Smartboiiyeet,
Welcome to Apple Support Communities. It sounds like you've tried some great troubleshooting so far. Next, try these sections of If your Mac doesn’t respond to key presses - Apple Support which may help get this sorted.
"If no keys work on an external keyboard
- Disconnect and reconnect the keyboard. Make sure the connector is completely inserted into the port.
- Connect your keyboard to a different USB port or to a different Mac. If this solves the problem, your Mac may need to be repaired. Contact Apple or an Apple Authorized Service Provider for service. Repairs performed by untrained individuals or using non-genuine Apple parts may affect the safety and functionality of the device.
- Connect a different keyboard to this Mac. If this solves the problem, you may need to take your keyboard in for service."
"If other keys don’t work
You may have accidentally set an option that changes how your keyboard operates.
- Choose Apple menu
> System Settings, click Accessibility
in the sidebar, then click Keyboard on the right. (You may need to scroll down.) Make sure Slow Keys is turned off. If Slow Keys is on, you must press and hold a key longer than usual before it’s recognized. - Choose Apple menu > System Settings, click Accessibility in the sidebar, then click Pointer Control on the right. (You may need to scroll down.) Make sure Mouse Keys is off.
- Choose Apple menu > System Settings, then click Keyboard
in the sidebar. (You may need to scroll down.) Click Edit next to Input Sources on the right, then turn on “Show Input menu in menu bar.” Open the Input menu, then make sure the correct keyboard layout is selected."
Test another keyboard if available. If this is isolated to the HP keyboard, it may be best to reach out to HP directly for further help. If you have the documentation that came with your keyboard, there should be contact info there. Otherwise, we found this page using an Internet search: https://support.hp.com/us-en/contact/help/product
All the best.