Original chargers often implement a protocol to tell the laptop that they support sufficient power (=Watt) to charge the laptop. If the laptop can't tell that it will have enough power it will go into a low power state where it doesn't charge the laptop.
This can happen because:
- The charger can't deliver enough power.
- The charger is broken and can't tell the laptop that it delivers enough power.
- The charger doesn't know how to tell the laptop that it can deliver enough power.
- The laptop part that should listen to the charger is broken.
- A software/driver failure.
Quite often the problem is the charger. Try to borrow an original charger from someone to test it.
Edit: If e.g. the new charger is 90W and the old charger is 120W, the expected behavior is that the battery will not charge, even if both chargers are from HP.