Continuity of coordinate functions
The condition you're describing is called continuous in each variable separately, and you're right; it's not enough to guarantee continuity on the product space.
One conventional counterexample is $f \colon \mathbb{R} \times \mathbb{R} \to \mathbb{R}$, $$ f(x,y) = \begin{cases} \frac{xy}{x^2+y^2} & (x,y) \neq (0,0) \\ 0 & (x,y) = (0,0) \end{cases} $$ Then $f$ is continuous in each variable separately. Indeed, the only non-obvious paths to consider are $f(0,y)$ and $f(x,0)$, and along these lines $f$ is identically zero. But $f$ is not continuous at zero; if you approach along the line $y=x$ you get a path limit of $\frac{1}{2}$.
Take $X,Y = \mathbb{R}$ and $$ f(x,y) = \begin{cases} \frac{xy}{x^2 + y^2} & (x,y) \neq (0,0) \\ 0 & (x,y) = (0,0) \\ \end{cases}. $$