Please use a torch to look into the Jack port to see if theres any build up of debris etc which can affect the user experience @Ama1
As a process of elimination can you try your earphones in another phone to test them ?
And try another set in your phone.
If your earphones have failed then approach the seller who supplied the phone for support.
Samsung themselves can also be approached for support.
Current Phone > Samsung Z Fold³ 5G.