Use a torch to look inside the port to ensure no debris is in there.
Make sure the earphones are firmly pushed into the phone.
As a process of elimination try your set in another phone and another set in your phone @Fforti
A Samsung Experience Store or Samsung Service Centre can take a look.
Daily Driver > Samsung Galaxy s²⁴ Ultra 512Gb ~ Titanium Black.
The advice I offer is my own and does not represent Samsung’s position.
I'm here to help. " This is the way. "