Poker wasn't invented, it evolved.
Poker isn't even an individual entity it is a family of gambling card games.
Various card games have been played for centuries.
The standardised 52 card 4 suit deck was adopted throughout Europe by 1480.
Brag, Poque and Poche were betting and stealing card games played in England, France and Germany
from which Stud Poker probably evolved.
But 20 card decks with betting on hand values recorded to have been played in New Orleans in the early 1800's also contributed to the evolution.
The american west and riverboat gamblers were probably the pioneers of that evolution with 52 card stud poker variants emerging around 1850.
Holdem Poker is thought to have started around the 1920's after it was discovered that the game of Stud Poker could not accommodate all the Texas ranchers that wanted to play, since the cards would run out before all the players had been dealt their cards.
However Holdem poker did not become widely popular until it was adopted as the game of choice for tournaments such as 'The World series of Poker
', the 'World Poker Tour' and online poker, where again a multitude of players could be accommodated with a small deck, although table size started to be standardised for 9 players. Holdem however also facilitated better spectator entertainment.