[guided]Fix $p \in S$, so $F(p) = y$. We want coordinates on $M$ near $p$ and coordinates on $N$ near $y$ in which the equation $F(x) = y$ becomes a coordinate equation. The hypothesis that $y$ is a regular value gives the surjectivity of
\begin{align*}
dF_p: T_pM \to T_yN.
\end{align*}
Thus $F$ has rank $n$ at $p$.
Choose smooth coordinate charts $(A,\varphi)$ on $M$ with $p \in A$ and $(B,\psi)$ on $N$ with $y \in B$. Because $F$ is continuous and $F(p)=y \in B$, shrink $A$ to an open neighbourhood of $p$ such that $F(A) \subset B$. In these charts, define the local representative
\begin{align*}
f: \varphi(A) &\to \psi(B), \\
z &\mapsto \psi\bigl(F(\varphi^{-1}(z))\bigr).
\end{align*}
The derivative $Df_{\varphi(p)}: \mathbb{R}^m \to \mathbb{R}^n$ represents $dF_p: T_pM \to T_yN$ under the coordinate identifications induced by $d\varphi_p$ and $d\psi_y$. Since $dF_p$ is surjective, $Df_{\varphi(p)}$ has rank $n$.
The Euclidean constant rank theorem requires constant rank on a neighbourhood, not just rank $n$ at one point. We verify that hypothesis. Since $Df_{\varphi(p)}$ has rank $n$, some $n \times n$ minor of the Jacobian matrix $Jf_{\varphi(p)}$ is nonzero. Let $\Delta: \varphi(A) \to \mathbb{R}$ denote the determinant of that same minor of $Jf_z$. The entries of $Jf_z$ are smooth functions of $z$, so $\Delta$ is smooth and hence continuous. Since $\Delta(\varphi(p)) \neq 0$, after shrinking $A$ around $p$ we have $\Delta(z) \neq 0$ for every $z \in \varphi(A)$. Therefore $Df_z$ has rank at least $n$ on this smaller neighbourhood. Because the codomain is $\mathbb{R}^n$, no derivative into $\mathbb{R}^n$ can have rank greater than $n$, so $Df_z$ has rank exactly $n$ for every $z \in \varphi(A)$.
Now the Euclidean constant rank theorem applies to the local representative $f$ on this neighbourhood. It provides smaller coordinate neighbourhoods $U_p \subset M$ of $p$ and $V_y \subset N$ of $y$, with $F(U_p) \subset V_y$, and coordinate charts
\begin{align*}
\theta_p: U_p &\to \theta_p(U_p) \subset \mathbb{R}^m, \\
\rho_y: V_y &\to \rho_y(V_y) \subset \mathbb{R}^n
\end{align*}
such that $\theta_p(p) = 0$, $\rho_y(y) = 0$, and the coordinate expression of $F$ is the projection onto the final $n$ coordinates:
\begin{align*}
(\rho_y \circ F \circ \theta_p^{-1})(u_1,\dots,u_m)
=
(u_{m-n+1},\dots,u_m).
\end{align*}
This is the point where regularity is used. Without surjectivity of $dF_p$, we would not obtain a nonzero $n \times n$ minor, so we could not force rank $n$ on a neighbourhood or obtain a codimension-$n$ coordinate model for the level set.[/guided]