According to the leaks and reporting, Xbox Series S should play all of the same games as the Series X with the same settings including ray tracing but at 1080p. The Xbox One X would struggle with ray tracing. It is actually the most obsolete in terms of its pricing. If you already have one, it's fine to continue using it. But it's not worth buying right now because you'd get so much more from either Series systems.
The One X doesn't have the hardware to legitimately attempt RT, but then even the XsX really doesn't close the door there without major performance trade offs. Even per
MS' own principle architect RT is basically an added layer of fidelity for most devs building for next gen.
Which makes sense. Nvidia is well ahead of AMD on RT hardware and the only way even their high end cards can reasonably do RT with 4K60 is to fake it with some level of DLSS (which is undeniably impressive).
Only pointing this out because people shouldn't get so hung up on RT as some kind of game changer. We're getting bigger game changers with next gen in storage speed, CPU capability, and truly current gen feature sets for GPUs (whereas last gen we got two consoles that were a generation behind the full GPU package, not just TFLOPS).
To answer the OP:
The Xbox One X was made to play Xbox One games at something north of 1080p, and outputting to support 4K TVs.
The Xbox One S is basically that in reverse, its the Xbox Series X with the raw GPU pixel power decreased to meet 1080p/1440p.
Microsoft isn't going to be making Xbox One games for much longer and the One X has never and will never meet economies of scale needed to meaningfully reduce its build costs. It was a boutique item from the start.
If you have a 1080p TV the XsS is a better buy: it will output better games in every way than what the One X can do on a 1080p TV.
If you have a 4K TV the XsX is a better buy since: it will output better games in every way by an even greater margin than what the One X can do on a 4K TV.
The Xbox One S meanwhile is a very viable platform for global markets where the new line is economically non-viable, and as an entry to XCloud/Game Pass.
This is microsoft attempting to cover all meaningful market angles. They follow Sony's lead in using their previous generation as a springboard into developing markets, they have the XsS for people who are content with 1080p or are looking for a more cost conscious system who won't mind a budget 4K TV up-scaling, and they have a high end.
Its about the broadest approach to the market we've ever seen someone shoot for. The real questions to me are:
1. is this too much noise for consumers to sort out v. Sony's much cleaner "both equal, one with a drive and one without" method
2. how strongly will Sony's market presence/loyalty tilt the scales regardless of MS' diverse offerings.