In book Topology by James Munkres the proof of product of compact spaces is compact uses a fact called Tube lemma as follows
Let $X$ and $Y$ be compact space than the product $X\times Y$ is compact.
Proof: Let $\mathcal A$ be an open cover for the product space $X\times Y$; Since $x_0 \times Y$ in $X\times Y$ is compact (as it is homeomorphic to $Y$) the open cover $\mathcal A$ admits a finite subcover say $\{A_i : i=1\dots m\}$ than $N=\bigcup_{i=1}^m A_i$ is an open set containing $x_0 \times Y$ by using tube lemma there exist an open set $W\times Y$ about $x_0 \times Y$ contained in $N$. Now, for each set of form $x\times Y$ there must be $W_x \times Y$ which is covered by finitely many sets of $\mathcal A$, moreover the set $\{W_x:x\in X\}$ forms an open over for $X$ as we know it is compact therefore the set admits a finite subcover for $X$ i.e $\{W_1, W_2,\dots , W_k\}$ hence the union of the sets $W_1\times Y, W_2\times Y, \dots , W_K\times Y$ form a finite subcover for $X\times Y$.
How does the $W_x \times Y$ which is covered by finitely many sets of $\mathcal A$ help us to conclude the final thing as I only see the compactness of X played a vital role for conclusion.
Thank You.