My USB-C wired headphones (compatible with Samsung S22 Ultra) stopped working, but then worked again, and then stopped working. I sometimes get the moisture indicator, and sometimes I don't. Either way, they stopped working. My phone or USB-C headphones have not been near water or any liquids. I bought aother new pair of USB-C headphones compatible with Samsung S22 Ultra, and they don't work either. But my USB-C charger still works fine without any problems.
Tried cleaning the ports on both phone and headphones
Tried disabling the USB audio routing in the Developer Options