We know that Tarski-Vaught criterion says: $M$ is an elementary submodel of $N$ iff $M$ is a submodel of $N$ and when $\overline{a}\in|M|^n$, $b\in |N|$, $N \models\phi[b,\overline{a}]$, then there is $b'\in |M|$ for which $N\models \phi[b',\overline{a}]$.
The direction "only if" is unclear to me. It would be clear if the last part had $M$ instead of $N$, as in the definition of an elementary submodel. But why $N$ in $N\models \phi[b',\overline{a}]$ is correct?
You can show by induction on the complexity of $\phi$ that it doesn't matter.
If $\phi$ is atomic, then just by being a substructure, $M$ and $N$ agree on the interpretation of terms and relations.
If $\phi$ is a conjunction, or negation of a formula then the induction hypothesis works out.
If $\phi$ is $\exists x\theta$, then by taking $\overline{a}'$ to be $\overline{a}$ with the addition of $b$, use the induction hypothesis on $\theta(x,\overline{a}')$ to finish the proof.