You may just have a bad connection, which can make it seem like the jack is bad.
Try gripping the headphone plug firmly, unplugging it, and then reinserting it.
check that that the jack is fully seated, and check to see if the headset works.
Examine the headset, cord, and connector.
Allow it to dry, then check to see if the headset works.
Examine the headset port in the controller.
It can be difficult to see inside this small port, so use a flashlight and do your best.
Be gentle, and take care to avoid damaging the internal components.
see to it the headset isnt muted.
Try a different controller or headset.
If you have multiple controllers and headsets, try them in different combinations.
Try a new headset with your existing controller first.
If it works, then your headphone jack is fine.
To update Xbox Series X or S controller firmware:
Check your privacy controls.
If your privacy prefs are set incorrectly, that can prevent your headset from working correctly.
To fix your privacy configs:
Replace or repair the headphone jack.