[step:Construct one elementary extension realizing all small types over a given model]Let $A$ be an $L$-structure such that $M \preceq A$ and $|A| \leq \kappa$. We construct an elementary extension $B \succeq A$ with $|B| \leq \kappa$ such that every complete type over every subset $C \subseteq A$ with $|C| < \kappa$ in finitely many variables is realized in $B$.
Let $L_A$ denote the expansion of $L$ by a constant symbol $c_a$ for each element $a \in A$. Since $|L| < \kappa$ and $|A| \leq \kappa$, we have $|L_A| \leq \kappa$. Let $\operatorname{Diag}_{\mathrm{el}}(A)$ denote the elementary diagram of $A$ in the language $L_A$.
Define $\mathcal{P}(A)$ to be the set of all pairs $(C,p)$ such that $C \subseteq A$, $|C|<\kappa$, and $p$ is a complete type in finitely many variables over $C$ consistent with $\operatorname{Diag}_{\mathrm{el}}(A)$. For each $(C,p) \in \mathcal{P}(A)$, choose a finite tuple of new variables $x_{(C,p)}$ of the same length as the variables of $p$, and introduce a tuple of new constant symbols $d_{(C,p)}$ of that length.
We claim that $|\mathcal{P}(A)| \leq \kappa$. Indeed, the number of subsets $C \subseteq A$ of cardinality $<\kappa$ is at most
\begin{align*}
|A|^{<\kappa} \leq \kappa^{<\kappa}=\kappa.
\end{align*}
For each such $C$, let $L_C$ denote the expansion of $L$ by a constant symbol $c_c$ for each element $c\in C$. The language $L_C$ has cardinality $<\kappa$, because
\begin{align*}
|L_C| \leq |L|+|C| < \kappa.
\end{align*}
For each fixed finite arity $n \in \mathbb{N}$, the set of $L_C$-formulas in variables $(x_1,\dots,x_n)$ has cardinality at most
\begin{align*}
\max\{|L_C|,\aleph_0\}<\kappa,
\end{align*}
where the strict inequality uses that $\kappa$ is uncountable. Hence the number of complete $n$-types over $C$ is at most
\begin{align*}
2^{<\kappa} \leq \kappa^{<\kappa}=\kappa.
\end{align*}
Taking the union over finitely many arities still gives at most $\kappa$ many types. Thus $|\mathcal{P}(A)|\leq\kappa$.
Let $L^\ast$ be the language obtained from $L_A$ by adding all constants in the tuples $d_{(C,p)}$. Then $|L^\ast|\leq\kappa$. Define the $L^\ast$-theory
\begin{align*}
\Sigma_A
:=
\operatorname{Diag}_{\mathrm{el}}(A)
\cup
\bigcup_{(C,p)\in \mathcal{P}(A)} p(d_{(C,p)}),
\end{align*}
where $p(d_{(C,p)})$ denotes the set of all formulas obtained by substituting the tuple of constants $d_{(C,p)}$ for the variables of $p$.
Every finite subset of $\Sigma_A$ is satisfiable. To see this, let $\Sigma_0 \subseteq \Sigma_A$ be finite. It uses only finitely many pairs $(C_1,p_1),\dots,(C_m,p_m)$ and finitely many formulas from each $p_j$. For each $j\in\{1,\dots,m\}$, let $\theta_j(x_j)$ be the finite conjunction of the formulas from $p_j$ appearing in $\Sigma_0$, where $x_j$ is the corresponding finite tuple of variables. Since $p_j$ is consistent with $\operatorname{Diag}_{\mathrm{el}}(A)$, there is an elementary extension of $A$ satisfying $\exists x_j\,\theta_j(x_j)$. By elementarity of $A$ in that extension, $A$ itself satisfies $\exists x_j\,\theta_j(x_j)$. Choose a tuple $b_j$ from $A$ witnessing this existential statement. Interpreting each constant tuple $d_{(C_j,p_j)}$ as $b_j$ and interpreting each $c_a$ as $a$ makes all formulas in $\Sigma_0$ true in $A$. Hence $\Sigma_0$ is satisfiable. Therefore, by the [Compactness Theorem](/page/Compactness%20Theorem) for first-order logic, $\Sigma_A$ has a model $B^\ast$.
Because $B^\ast \models \operatorname{Diag}_{\mathrm{el}}(A)$, the interpretation of the constants $c_a$ gives an elementary embedding $A \preceq B^\ast|_L$. Let $S\subseteq B^\ast|_L$ be the set consisting of the image of $A$ together with all interpretations of the constants in the tuples $d_{(C,p)}$. Then
\begin{align*}
|S| \leq |A|+|\mathcal{P}(A)|\cdot\aleph_0 \leq \kappa.
\end{align*}
The [Downward Löwenheim-Skolem Theorem](/page/Downward%20L%C3%B6wenheim-Skolem%20Theorem), applied to the $L$-structure $B^\ast|_L$ and the subset $S$, gives an elementary substructure $B \preceq B^\ast|_L$ containing $S$ and satisfying
\begin{align*}
|B| \leq \max\{|L|,|S|,\aleph_0\}\leq \kappa.
\end{align*}
Then $A \preceq B$, and by construction $B$ realizes every type indexed by $\mathcal{P}(A)$.[/step]