We can only speak of a continuous function $X\to Y$ if $X$ and $Y$ are both topological spaces, hence are equipped with a topologies $\tau_X$ and $\tau_Y$.
Analogously we can only speak of a measurable function $X\to Y$ if $X$ and $Y$ are both measurable spaces, hence are equipped with a $\sigma$-algebra $\sigma_X$ and $\sigma_Y$.
If $f:X\to Y$ is continuous, then can we conclude that $f$ is measurable?
That depends on the question how these topologies and $\sigma$-algebras are related.
Commonly one works with $\sigma_X=\sigma(\tau_X)$ and $\sigma_X=\sigma(\tau_X)$ where $\sigma(\mathcal V)$ denotes the smallest $\sigma$-algebra that contains $\mathcal V$.
In that case $f$ can be shown to be measurable. This because it can be deduced in general that:$$f^{-1}(\sigma(\mathcal V))=\sigma(f^{-1}(\mathcal V))\tag1$$
For a proof of that see here.
Function $f$ is continuous if and only if $f^{-1}(\tau_Y)\subseteq\tau_X$ so that in that case: $$f^{-1}(\sigma_Y)=f^{-1}(\sigma(\tau_Y))=\sigma(f^{-1}(\tau_Y))\subseteq\sigma(\tau_X)=\sigma_X$$where the second equality is an application of $(1)$.
This states exactly that $f$ is measurable.