Newer laptops tends to have one 4-pin jack socket (for headsets: headphones with a microphone) and sometimes 3-pin jack (for regular headphones) acts weird in it. Try connecting some headset (e.g. for phone) and see if it will work - in that case there are splitters: 4-pin male to double 3 pin female.
That happens both ways, 4-pin jacks can act weird in 3-pin sockets, there are adapters form that case too.
There’s tones of other possibilities and we need more details to be able to help you.
Start with pasting here output of inxi -Aa
and a screen-shot of sound settings with and without headphones plugged in.