Switching the quantifier of definition for Continuity

Let $f: X \rightarrow Y$ in metric spaces, and let $x^*\in X$, and $y^* = f(x^*)$, $f$ is continuous at $x^*$ iff $\forall \epsilon \gt 0, \exists \delta \gt 0$ such that $B_{\delta}(x^*) \subseteq f^{-1}(B_{\epsilon}(y^*))$.

Now if we switch the order of quantifiers for this definition: $f$ is continuous at $x^*$ iff $\exists \epsilon \gt 0$ such that $\forall \delta \gt 0$, $B_{\delta}(x^*) \subseteq f^{-1}(B_{\epsilon}(y^*))$.

Does continuity imply the new definition? And does the new definition imply continuity? If yes please provide an explanation, if not could someone give a counterexample please? Thanks.

Your condition is equivalent to saying $f(X) \subset B(\epsilon,y^*)$ for some $\epsilon > 0$. In other words the image of $X$ is bounded. Now that fails for the continuous identity function on $\mathbb R$. In the other direction just take a function that maps the negative real line and zero to $-1$ and the positive real line to $1$. The image is bounded but the function has a discontinuity at zero.