Yes.
But can a TWS beat a wired IEM that sell for a similar price?
Yes.
In my experience, in general and subject to exceptions, a wired IEM will beat a similarly priced TWS IEM. But there's a whole of of other things to consider. TWS have a lot of features that wired IEMs don't (portability, battery life, ANC, codecs, multipoint, sweat resistance etc.) . I assume your question is limited to sound quality and in most cases, a wired IEM will sound better than a TWS IEM assuming price is equal. The vast majority of TWS on the market are not focused on pure SQ. Stated differently, they aren't even trying to beat a wired IEM. So I think you are probably comparing apples to oranges unless all you care about is pure sound quality. In that case, you have your answer (subject to exceptions).