With only Europe December sales to add Xbox Series will have sold only around 4.9m-5m in 2024 globally according to vgchartz estimates. For comparison the XBO sold 9.1m in the equivalent year (2017). Sales are a little over HALF that of XBO, a console considered by many to be a failure.
The XBO worst full year sales while being the latest MS console on the market was 6.5m in 2019 and this year XBS is almost 25% lower than that. Hell the XBO sold 4m in 2020 despite XBS killing it's holiday. Xbox Series sales are so bad that it being discontinued by the end of the year isn't an impossibility, though the only scenario in which I see that happen is one where their next console hardware is also cancelled.
If the sales stopped bleeding it would still take until almost the end of 2027 for it to reach 40m, but the Series sales have been declining consistently since the end of 2022. The sales just keep dropping. If it suffers the same YoY drop it had in 2024 for 2025 it will only sell 3.3m units this year.