Take a submanifold atlas on $S$. In each coordinate chart, extend $X$ to $X_\alpha$ in $TU_\alpha$ in the canonical way. Then take a partition of unity subordinate to the $U_\alpha$ and define a vector field on $U = \cup U_\alpha$. Check that at each $p\in S$, this vector field agrees with $X$.
(Slick alternative method: Pick a Riemannian metric on $M$ and use parallel transport along geodesics perpendicular to $S$.)
By request, some detail on "the canonical way."
Use submanifold coordinate charts $\psi_\alpha: U_\alpha\to\mathbb{R}^n$ such that $\psi_\alpha(U_\alpha)$ is convex. (This can always be done by replacing $U_\alpha$ with the preimage of a small open ball contained in $\psi_\alpha(U_\alpha)$.) Edit, 2025: As WhiteLake points out, convexity doesn't seem necessary
As $\psi_\alpha$ is a submanifold chart, any $p\in U_\alpha$has the form $\psi_\alpha(p) = (x,y)$ where $x \in \mathbb{R}^m$ is in the image of $\psi_\alpha(S)$. Define $X_\alpha$ by translating $X$ "up and down" the fiber over the submanifold point, i.e. $X_\alpha(x,y) = X(x)$.
Now let $f_\alpha$ be a $C^\infty$ partition of unity subordinate to the coordinate atlas $U_\alpha$. Define the extension $\bar{X} = \sum_\alpha f_\alpha X_\alpha$.
Exercise: Verify that $\bar{X}$ is well-defined, smooth, and agrees with $X$ in $S$.