X owns the trademark for "X" simply by using it, whether it was registered with a trademark office or not. It certainly doesn't hurt that Elon's company registered X.com in 1993, then he purchased it from Paypal in 2017 and has been using it in various capacities since then.