Completely different style of game, one is fly your own ship + multiplayer and other is fly a ship while trying to micromanage a fleet of ships doing trading, fighting & everything else.
At the moment, out of the two I would pick Elite Dangerous.
I personally bought X4 which made me want to play Elite again (bought in 2015). I like both games for their different styles but have found myself playing Elite more & even bought the Horizons Season Pass.
X4 seems like a game for the future, it's quite expensive at the moment in comparison to Elite and the UI/UX is terrible.
Elite Dangerous still has the problem of getting boring from grind but there are lots of things to do, the new exploration tools are fun & the new mining looks interesting.
Elite still doesn't feel like an MMO in comparison to something like EVE Online.
If they could add MMO aspects it could be amazing but I guess it has been out for 4 years already & they haven't moved into player interaction or trading or alliances/corps, if anything you get punished for co-op of multicrew etc.