Hi, please remove all accessories and restart your device.
Make sure there isn't anything that may interfere with plugging in the headphones.
Remove the headphones and connected accessories such as cases, charms, or skins. Once you have removed everything, restart your device and check for the issue.
If you are using a third-party USB-C adapter that allows you to use headphones while charging a device without a headphone jack, remove the adapter, and then connect the headphones directly to the device.
Check if there are any software updates for your device by navigating to Settings, and then tapping Software Updates or System Updates.
If you still have issues with your wired headphones, please visit a Samsung authorized service center to get it examined by the service technician and get it fixed.
Please visit the link given below to know the nearest Samsung authorized service center.
Thank you for your response. I am currently using the original samsung USB C to 3.5 mm adapter with my phone. The phone charges well, it is just the audio which is the problem.