That’s true. They sold a version that was basically a last generation console and apparently easy to manufacture and keep on shelves, but the X did struggle like the PS5.
While the Xbox Series X, like the PS5, was extremely difficult to obtain due to the coronavirus pandemic, the Series S was relatively easy to purchase. In fact, the Series S outsold the PS5 in Japan during the weeks when PS5 supply was low.
The Xbox Series X was nearly impossible to get at retail for two years, and is still difficult to find unless you pay $100-200 more for a bundle.
It's not at all surprising to me that a console launch is going to do poorly if it can't be purchased without dealing with scalpers.