It seems as if your headphone socket in the phone is faulty or has broken off the lower mainboard.
You could try plugging in your headphones and very gently (stress gently) apply sideways pressure to the headphone jack in one direction or any other direction and see if you can hear anything in your headphones.
If you can it means that your headphone socket may be still connected to the mainboard and it may be just loose OR it could be that the connectors in the socket have lost tension.
If you hear nothing when you try this it may be that the socket has broken off the lower main board.
Either way the phone will have to be opened to be repaired.
Here is a link on how to disassemble your phone. The headphone socket is best seen at about 9 minutes 12 seconds onwards into the video, when the mainboard is nearly freed from the housing https://www.youtube.com/watch?v=4bf-gYNY...
If you don't feel confident about doing it yourself take it to a mobile phone repair service.