Eh, that's a proper 1 billion £/€/$ question!
The theme is the same (first person action/trading simulation/fleets and properties management), but they are quite different titles from each other, especially Rebirth. I'm sure that's a question already asked and already answered more than once over the last 72 pages, but since they are 72 pages indeed, a TL;DR:
- X3 (Terran Conflict/Albion Prelude): oldest of the bunch (first released almost 15 years ago!), still considered the gold standard of sandbox space games and the pinnacle of X by many. Overwhelming quantity of ships, weapons, sectors, features added over the years. Interface and learning curve are hard as nails, but the fact the game still holds out well today in almost every aspect (even visuals!) is telling.
- X4: a definitely more modern package, a mix of X3 features with what worked of X Rebirth. Every ship flyable as in X3, modular damage on capships and spacelegs as in Rebirth, station management and economy simulation vastly superior to both, and for the first time in a X title an actual 3D map from where it's possible to select units and give many orders like in a proper RTS game. Still more limited in content compared to X3, even with the latest DLC. Interface is also vastly improved in usability, but everything is still hard as nails and a far cry from visually appealing. Also, bugs will probably be ironed out for years to come. An almost two years old X game is usually still in its infancy.
- X Rebirth VR: an offspring of Rebirth which was an offspring of the classic X games, universally panned by everyone and their dog, but after its latest updates a very solid game even with its reduced set of features compared to X3 (still a good bunch of very questionable gameplay and QoL decisions though). Total smoking crap for everyone not coping with its single flyable ship or it not being "X3, but with more". The VR is a slimmer version of Rebirth (less station and ships flying around, somewhat simplified economy), but it's VR, and the Albion Skunk in VR must look awesome. Of notable mention, a very strong artistic direction compared to X3 and X4, some great looking capital ships, probably still the best capship battles to be seen in any X game so far, from a visual point of view.
Hard to suggest one
@Old Duck , if in complete doubt I'd say "go for the cheapest, better to cry over 5 £ than over 50£", but of course even with its massive content and features set, it won't be as smooth or fancy to play as the latest. There's also the lore side of things, X3 comes decades before X4, but lore anyway is so stretched thin that it shouldn't really be a factor in the decision.
And in some unrelated curiosity, while over here we debate about the future carriers, the latest DLC just added this:
https://www.reddit.com/r/X4Foundations/comments/fskvh6
Source: https://www.reddit.com/r/X4Foundations/comments/fskvh6/this_new_split_ship_is_amazing/
And no upkeep costs!