Finitely generated free group has finite rank

If we would have a free group $F$ with rank $|X|$ where $|X|$ is infinite, then we can see $F$ as the group of all words over $X\cup X^{-1}$ with the usual concatenation (the 'standard' free group). Suppose we would have a finite generating set $\{g_1,\dots,g_k \}$. Then every $g_i$ is a word $x_{i_1}^{\pm}\dots x_{i_{n_i}}^{\pm}$ which uses only finitely many letters of $X$, so there will always be an element $x \in X$ not appearing in any of the generators. This implies that $x$ is not in the subgroup generated by $\{g_1,\dots,g_k\}$ so no such generating set can exist.

Alternatively, you could prove that the abelianization of the free group $F$ of rank $|X|$ is the abelian free group of rank $|X|$, i.e. $$\bigoplus_{x\in X} \mathbb{Z} $$ using the universal property. Tensoring with $\mathbb{Q}$ gives you a vector space of dimension $|X|$, which has clearly no finitely generating set (because such a set should contain a basis).