Rather than trying to dissect which console has the best games, which is entirely subjective, let's have a look at objective some facts about the game libraries of both of the 4K home consoles.
Xbox One X has a sizable advantage here when taking in to consideration only the sheer number of games available to play on Xbox One X. Aside from the Xbox One's library of games, all Xbox One systems are backward compatible with an ever-growing list of Xbox 360 games, and at E3 2017, Microsoft announced that backward compatibility with original Xbox games is coming this fall. That means the Xbox One X will soon be the only home console capable of playing games from any generation in that console's history, meanwhile the Playstation 4 is the first home Playstation console to have no backward compatibility whatsoever.
This, however is the 4K era of games, and while it's nice to be able to dig out old games and play them again, to focus on new, console exclusive games paints a different picture. Both consoles have the multiplatform blockbusters like Call of Duty and Assassins Creed, and each have their own storied franchises like Halo and Gears of War on Xbox or Uncharted and God of War on Playstation.
The problem here for Xbox One X is that so far, all of the hit games have a bit of sequelitis. Gears of War 5, Halo 5 Guardians, Forza Motorsport 7, Crackdown 3, may be great games but none really bring anything new to the table aside from better graphics, sound, and new game modes, and with Microsoft's Windows 10 cross-platform initiative, going forward these games will not even be console exclusive. Playstation 4 on the other hand, has its sequels but also has new and exciting IPs like The Last Guardian, Horizon Zero Dawn, Bloodborne, Until Dawn, and The Order: 1886 just to name a few.
Then there is the matter of VR, and while Microsoft has had press events detailing various ideas and demos they have for virtual reality and augmented reality with their Hololense, there is currently no way to experience VR and no release dates planned for any VR or AR release for Xbox One or One X. Playstation 4, on the other hand, has PS VR which has a growing library of VR titles, many of them Playstation VR exclusives, and buying a Playstation 4 or 4 Pro and a PS VR is currently one of the least expensive ways to get into VR.
Although backward compatibility is a great feature for new and past console owners, the variety of multiplatform hits, fan favorite franchise sequels, as well as wholly new and original IPs, and a robust library of VR titles makes Playstation 4 Pro the winner here.
Winner: Playstation 4 Pro