[step: Upper bound — $[L:K] \leq |G|$]
Set $n = |G|$ and suppose for contradiction that $[L:K] > n$. Then there exist $n+1$ elements $\alpha_1, \dots, \alpha_{n+1} \in L$ that are linearly independent over $K$.
Write $G = \{\sigma_1, \dots, \sigma_n\}$ and consider the homogeneous system
\begin{align*}
\sigma_1(\alpha_1)\,x_1 + \sigma_1(\alpha_2)\,x_2 + \cdots + \sigma_1(\alpha_{n+1})\,x_{n+1} &= 0 \\
\sigma_2(\alpha_1)\,x_1 + \sigma_2(\alpha_2)\,x_2 + \cdots + \sigma_2(\alpha_{n+1})\,x_{n+1} &= 0 \\
&\;\;\vdots \\
\sigma_n(\alpha_1)\,x_1 + \sigma_n(\alpha_2)\,x_2 + \cdots + \sigma_n(\alpha_{n+1})\,x_{n+1} &= 0
\end{align*}
This is $n$ equations in $n+1$ unknowns over $L$, so it admits a nontrivial solution $(x_1, \dots, x_{n+1}) \in L^{n+1}$.
[guided: Choose a nontrivial solution with the fewest nonzero entries and derive a contradiction.]
Among all nontrivial solutions, choose one — call it $(c_1, \dots, c_{n+1})$ — with the minimal number of nonzero coordinates. By reindexing we may assume $c_1 \neq 0$, and after dividing through by $c_1$ we may assume $c_1 = 1$. Minimality forces at least two nonzero coordinates, so some $c_j \notin K$ (if every $c_j$ were in $K$, the relation $\sum_j c_j \alpha_j = 0$ from the row $\sigma_i = \mathrm{id}$ would contradict linear independence over $K$).
Pick $\tau \in G$ with $\tau(c_j) \neq c_j$. Applying $\tau$ to every entry of the solution and using the fact that $\{\tau \sigma_1, \dots, \tau \sigma_n\}$ is just a permutation of $G$, the tuple $(\tau(c_1), \dots, \tau(c_{n+1}))$ is again a solution. Subtracting it from the original gives the solution
\begin{align*}
(c_1 - \tau(c_1),\; c_2 - \tau(c_2),\; \dots,\; c_{n+1} - \tau(c_{n+1})).
\end{align*}
Its first coordinate is $1 - \tau(1) = 0$, so it has strictly fewer nonzero entries than $(c_1, \dots, c_{n+1})$. It is nontrivial because $c_j - \tau(c_j) \neq 0$. This contradicts minimality. Hence $[L:K] \leq |G|$.
[step: Lower bound — $[L:K] \geq |G|$ via Dedekind independence]
Write $G = \{\sigma_1, \dots, \sigma_n\}$ with $n = |G|$. Suppose toward contradiction that $[L:K] < n$. Then every $K$-linear map $L \to L$ lives in a space of $K$-dimension at most $[L:K]^2 < n^2$, and in particular any $n$ such maps must be $L$-linearly dependent. Each $\sigma_i$ restricts to a $K$-linear map $L \to L$, so there would exist $a_1, \dots, a_n \in L$, not all zero, with
\begin{align*}
a_1\,\sigma_1(x) + a_2\,\sigma_2(x) + \cdots + a_n\,\sigma_n(x) = 0 \quad \text{for all } x \in L.
\end{align*}
[guided: Show this contradicts the Dedekind independence lemma.]
The Dedekind independence lemma states that distinct field homomorphisms $\sigma_1, \dots, \sigma_n \colon L \to L$ are linearly independent over $L$: no nontrivial $L$-linear combination $\sum a_i \sigma_i$ can vanish identically on $L$.
The relation above is exactly such a nontrivial $L$-linear combination, contradicting Dedekind independence. Therefore $[L:K] \geq |G|$.
[step: Conclusion — $[L:K] = |G|$ and $\mathrm{Gal}(L/K) = G$]
Combining the two bounds gives $[L:K] = |G|$.
[guided: Deduce that $\mathrm{Gal}(L/K) = G$.]
By definition $K = L^G$, so every $\sigma \in G$ fixes $K$ pointwise, meaning $G \subseteq \mathrm{Gal}(L/K)$. On the other hand, $L/K$ is a finite extension of degree $|G|$, so $|\mathrm{Gal}(L/K)| \leq [L:K] = |G|$. Since $G \subseteq \mathrm{Gal}(L/K)$ and $|G| \leq |\mathrm{Gal}(L/K)| \leq |G|$, we conclude $\mathrm{Gal}(L/K) = G$. $\blacksquare$