$\DeclareMathOperator{\sgn}{sgn}\newcommand{\Reals}{\mathbf{R}}\newcommand{\eps}{\varepsilon}$Uniform continuity is a "global" property, depending not only on the formula(s) defining a function but on the domain $X$. To see why, compare the definitions of "$f$ is continuous on $X$" and "$f$ is uniformly continuous on $X$":
For every $x$ in $X$ and every $\eps > 0$, there exists a $\delta > 0$ such that if $y \in X$ and $|x - y| < \delta$, then $|f(x) - f(y)| < \eps$. (Here, $\delta$ implicitly depends on both $\eps$ and $x$; there may or may not exist a positive lower bound on $\delta$ as $x$ ranges over $X$.)
For every $\eps > 0$, there exists a $\delta > 0$ such that if $x$, $y$ are in $X$ and $|x - y| < \delta$, then $|f(x) - f(y)| < \eps$. (Here, $\delta$ depends only on $\eps$; a single $\delta$ "works" for every $x$ in $X$. Whether or not this condition is true may depend on the set $X$.)
Consider the squaring function, $f(x) = x^{2}$, on an unspecified domain $X \subseteq \Reals$. Since
$$
|f(x) - f(y)| = |x^{2} - y^{2}| = |x - y|\, |x + y|,
$$
$f$ is uniformly continuous if $X$ is bounded: If $X \subset [-M, M]$, then $|x + y| \leq |x| + |y| \leq 2M$ on $X$ by the triangle inequality. For every $\eps > 0$ we can choose $\delta = \eps/(2M)$ to see $f$ is uniformly continuous. (Boundedness of $X$ is not necessary; think of what happens for $X = \mathbf{Z}$, the set of integers: You can take $\delta = 1/2$ no matter what function you're considering.)
Another example often surprises students the first time they see it, and may hightlight the global (domain-dependent) nature of uniform continuity: Let $X = \Reals \setminus\{0\}$, and define $\sgn:X \to \Reals$ by
$$
\sgn(x) = \frac{x}{|x|}
= \begin{cases}
1 & \text{if $x > 0$,} \\
-1 & \text{if $x < 0$.}
\end{cases}
$$
The function $\sgn$ is locally constant: For every non-zero $x_{0}$, $\sgn$ is constant on the open interval with endpoints $0$ and $2x_{0}$; that's "as continuous as you can get", pointwise.
But $\sgn$ is not uniformly continuous on $X$: For every $\delta > 0$, the points $x = -\delta/3$ and $y = \delta/3$ satisfy $|x - y| < \delta$, but are of opposite sign, so $|\sgn(x) - \sgn(y)| = 2$.
I leave to you the fun of analyzing the same formula on the set $\Reals\setminus[0, 0.0001]$ obtained by removing an interval of positive length that contains $0$.