Hey there! @Biswasalamin, Welcome to HP forums.
I understand you have audio issues with your laptop.
Don't worry I'll try to help you out.
Did you make any software or hardware changes on your PC?
Is the headphones securely connected into the audio port?
As you mentioned the audio is playing both on your headphones and speakers.
1. In the search box, type control panel Go to the control panel, Hardware and Sound page, open the Realtek HD Audio Manager].
2. To the right of the page, click on the Analog folder (Connector settings) icon.
3. check the box to enable a pop-up box when a device is plugged in and click "OK"
4. plug in your earphones and when the box pops up, click on headphones (vs. line-out)
5. the device then mutes the external speaker!
If the issue still persists uninstall the audio drivers from device manager and install the latest audio drivers and BIOS on your PC and check if it helps.
Link to update the audio drivers.
Also, update the BIOS using this link.
Let me know if this works!
Have a great day ahead! 🙂
A4Apollo
I am an HP Employee