Xterra X model VS Xterra S

Not any I can think of. X to S is mostly interior trim differences and exterior appearance items. There will be a difference in the rear axle and gearing if you get a manual trans vs the auto in the X and S trim levels.
I can't remember which one is the stripper model, but they really gutted it. Manual windows, manual door locks, manual mirrors, steel wheels, I think a lower trim of seats. The roof storage big goes away. Actual contents vary by year as well. It was the model to get the "starting price of $xx,xxx" for advertising.

The engine, transmission, brakes, suspension all stayed the same (off-road/Pro-4x models actually got some changes). The MT gearing was different on the early years compared to the Off-road package but later years was the same.

Unless there is a huge price difference (that I don't think you will find) the upper trim is a better choice. At this point condition will drive price more than trim level. A good condition stripper model will be a better vehicle than a hammered upper trim.