I have consider the counterexample of $f(x)=sin(1/x)$ with $X=(0,1]$ and $Y=[-1,1]$.
$f$ is continuous on $X=(0,1]$ , but $X=(0,1]$ is not complete. Also, I think the that $Y$ is compact which implies that it is complete. Thus, $(X,\rho)$ is not necessarily complete under given circumstances.
Also you can consider following easy example,
Let,
$f:(0,1]\to\{0\}$ be defined by $f(x)=0$ for all $x$
Where $(0,1]$ and $\{0\}$ has standard metric of $\mathbb R$.
Clearly $f$ is continuous function and $\{0\}$ is complete metric space but $(0,1]$ is not complete metric space.