and what's the deal with x y , sun moon? you only play one, and trade with players that own the other? but there's no point in buying both because they're too similar?
It's kind of complicated. They come in pairs (sometimes with a third version that has more stuff), but every game in a group is virtually identical in terms of gameplay and plot, with only minor changes between the version. When choosing a version, just go with the one that has the coolest-looking cover muggle.
More generally, at its core, Pokemon hasn't changed much in 20 years. Sure, it has slowly progressed, adding content, mechanics, QoL features, a teensy bit of narrative depth (occasionally), and lots of refinements over the years. But in the end, your experience playing Pokemon Red is not going to be wildly different from your experience playing Pokemon Moon or anything in between (although you might not want to play the original gameboy games, since they haven't aged well visually).
The good news is that there really isn't a bad game in the bunch, and you pretty much cannot go wrong with literally any game in the main series. The bad news is that there isn't a quintessential Pokemon game, since even fan favorites have something holding them back.
If you want the best story, start with Black/White. If you want the strongest difficulty curve (outside of self-imposed challenges or challening rom hacks), Sun/Moon. If you want the games most packed with content, HearGold/SoulSilver or Black2/White2 (Black2/White2 are sequels to Black/White, so keep that in mind). If you want a faithful remake of the first games with more up-to-date visuals, gameplay systems, and quality of life features, FireRed/LeafGreen. Strongest all-around package? HeartGold/SoulSilver. Most modern games? Sun/Moon.
Sun/Moon also have fairly strong plot and characterization, and the region is a joy to explore... except this exploration is marred, especially in the beginning, by the game packing one long-ass cutscene after another. It's kind of insufferable. Also, the post-game is quite thin. Meanwhile HeartGold/SoulSilver are just solid as rocks... but the difficulty curve is too easy, and the main story line is a bit meh.
If you're limiting your choices to games currently in print and/or available for download, I'd go with Sun/Moon, or possibly Omega Ruby/Alpha Sapphire. ORAS doesn't look as nice as Sun/Moon (although Sun/Moon does have graphical slowdown in some battles), it does have a lot of charm in its own right, and is very strong in terms of having lots of in-game stuff to do. It also has less of that railroading cutscene bullshit than Sun/Moon has, so if you want to avoid that, ORAS is a good alternative. Only big problem with ORAS (aside from a relatively thin post-game) is that it has an item that give you way too much exp for your entire team, but without the experience scaling that helps keep Sun/Moon challenging. You can turn this item off. You won't, because none of us do, and all of us bitch about ORAS (and XY) being too easy because of it.
I don't recommend X and Y. They're good games, but they have some weaknesses and feel rushed in a number of places (especially for story/characters and post-game content).
The original games, Red/Blue/Yellow, are available on the 3DS eshop, complete with local trading and battling. You can even transfer your Pokemon from those games to sun/moon via a paid service. I wouldn't recommend them until/unless another game hooks you first and you are ready for a retro trip to the 90's. They look like ass and have lots of bugs and out-of-date systems. Pick yellow if you must get one. It has a bit of color, you get all of the starters, and the sprites are actually mostly on model. Same cannot be said of Red/Blue.