The Series S is cheaper mainly because Microsoft put less hardware inside. The most visible cut is the disc drive: the Series S is digital-only, so every game comes as a download or through Game Pass. The Series X Digital also skips the drive, but that only trims $50, because the rest of the Series X hardware stays identical.
The bigger savings are under the hood. Both consoles use a custom AMD Zen 2 processor and an AMD RDNA 2 graphics chip, but the Series X runs its processor at a higher speed and has 52 compute units in its graphics chip against 20 in the Series S. Compute units are the building blocks that do the graphics work, so more of them means more power.
That shows up in headline numbers. The Series X delivers 12 teraflops of processing power and aims for 4K, while the Series S manages 4 teraflops and runs most games at up to 1440p. Memory follows the same pattern: 16GB of RAM in the Series X, with 10GB at 560 GB per second, against 10GB in the Series S, of which 8GB runs at 224 GB per second.
Storage is the last piece. The base Series S has 512GB, which fills up quickly with modern games, while the Series X comes with 1TB. Either console can add space with an expansion card that plugs into the back.