9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1 = 362880. Which is a very small number for a computer.
So Tic-Tac-Toe is a solved game, meaning for any starting move, we know how the game will end.
If you rotate the board, every other first move is the identical to one of these three moves.
You can also reflect the board (like in a mirror), and reduce the number of unique games even more.
And many games end with a winner before the grid is filled.
Taking all this into account, the total number of games is only 26,830.
X's first three moves are corner, center, edge touching previous two moves. O cannot win. Try it.
There are 5362 positions after 4 moves, and 71852 after 5 moves, and 809896 after 6 moves.
Total number of moves in a game is estimated to be 1050. That is a very big number with 50 zeros.