[proofplan]
We prove the adjunction isomorphism by writing both line bundles in local coordinates adapted to the smooth divisor. On each coordinate neighbourhood where $D$ is cut out by one holomorphic coordinate, we build a local frame of $\left(K_X \otimes \mathcal{O}_X(D)\right)|_D$ and compare its transition functions with those of $K_D$. The determinant calculation shows that the transition functions agree, so the local identifications glue to a natural global isomorphism. Finally, when $D$ is the zero divisor of a section of $L$, the section identifies $L$ with $\mathcal{O}_X(D)$.
[/proofplan]
[step:Choose local coordinates adapted to the smooth divisor]
Let $\{U_a\}_{a \in A}$ be an open cover of $X$ such that, for every $a \in A$, there is a holomorphic coordinate chart
\begin{align*}
z_a: U_a &\to z_a(U_a) \subset \mathbb{C}^n, \\
p &\mapsto \left(z_{a,1}(p),\dots,z_{a,n}(p)\right),
\end{align*}
with
\begin{align*}
D \cap U_a = \{p \in U_a : z_{a,n}(p)=0\}.
\end{align*}
Write
\begin{align*}
V_a := D \cap U_a.
\end{align*}
Then
\begin{align*}
x_a: V_a &\to \mathbb{C}^{n-1}, \\
p &\mapsto \left(z_{a,1}(p),\dots,z_{a,n-1}(p)\right)
\end{align*}
is a holomorphic coordinate chart on $D$.
For each $a \in A$, define the local holomorphic $n$-form
\begin{align*}
\Omega_a := dz_{a,1} \wedge \cdots \wedge dz_{a,n}
\end{align*}
on $U_a$, and define the local holomorphic $(n-1)$-form
\begin{align*}
\omega_a := dx_{a,1} \wedge \cdots \wedge dx_{a,n-1}
\end{align*}
on $V_a$.
[guided]
Because $D$ is a smooth divisor, near every point of $D$ it is cut out by one holomorphic coordinate. Thus we may cover $X$ by coordinate neighbourhoods $U_a$ on which the divisor is locally the hypersurface $z_{a,n}=0$. The remaining coordinates restrict to coordinates on $D$:
\begin{align*}
x_a(p) = \left(z_{a,1}(p),\dots,z_{a,n-1}(p)\right).
\end{align*}
The canonical bundle $K_X$ is locally generated by the top holomorphic form
\begin{align*}
\Omega_a = dz_{a,1} \wedge \cdots \wedge dz_{a,n},
\end{align*}
while the canonical bundle $K_D$ is locally generated by
\begin{align*}
\omega_a = dx_{a,1} \wedge \cdots \wedge dx_{a,n-1}.
\end{align*}
The proof will compare the transition functions for these two kinds of frames after tensoring $K_X$ with the divisor line bundle $\mathcal{O}_X(D)$.
[/guided]
[/step]
[step:Compute the transition functions for $K_D$]
On an overlap $V_a \cap V_b$, define the [holomorphic function](/page/Holomorphic%20Function)
\begin{align*}
A_{ab}: V_a \cap V_b &\to \operatorname{Mat}_{(n-1)\times(n-1)}(\mathbb{C}), \\
p &\mapsto \left(\frac{\partial z_{a,i}}{\partial z_{b,j}}(p)\right)_{1 \le i,j \le n-1}.
\end{align*}
Since $x_a$ and $x_b$ are coordinate systems on $D$, the change of coordinates on $D$ gives
\begin{align*}
\omega_a = \det(A_{ab})\, \omega_b
\end{align*}
on $V_a \cap V_b$.
[guided]
On $V_a \cap V_b$, both $x_a$ and $x_b$ are holomorphic coordinate systems for the same complex manifold $D$. The Jacobian matrix of this coordinate change is
\begin{align*}
A_{ab}(p)=\left(\frac{\partial z_{a,i}}{\partial z_{b,j}}(p)\right)_{1 \le i,j \le n-1}.
\end{align*}
This matrix records only the tangential coordinates, because on $D$ the coordinate $z_{a,n}$ is normal to the divisor.
The transformation law for a wedge product of differentials gives
\begin{align*}
dx_{a,1} \wedge \cdots \wedge dx_{a,n-1}
=
\det(A_{ab})\,
dx_{b,1} \wedge \cdots \wedge dx_{b,n-1}.
\end{align*}
Therefore
\begin{align*}
\omega_a = \det(A_{ab})\,\omega_b.
\end{align*}
So $\det(A_{ab})$ is the transition function of $K_D$ from the frame $\omega_b$ to the frame $\omega_a$.
[/guided]
[/step]
[step:Compute the transition functions for $\left(K_X \otimes \mathcal{O}_X(D)\right)|_D$]
For each $a \in A$, let
\begin{align*}
f_a: U_a &\to \mathbb{C}, \\
p &\mapsto z_{a,n}(p)
\end{align*}
be the local defining function of $D$ on $U_a$. Let $e_a$ denote the local frame of $\mathcal{O}_X(D)$ on $U_a$ corresponding to the meromorphic section $1/f_a$.
On $U_a \cap U_b$, there is a nowhere-vanishing holomorphic function
\begin{align*}
u_{ab}: U_a \cap U_b &\to \mathbb{C}^\times
\end{align*}
such that
\begin{align*}
f_a = u_{ab} f_b.
\end{align*}
Hence
\begin{align*}
e_a = u_{ab}^{-1} e_b.
\end{align*}
Let
\begin{align*}
J_{ab}: U_a \cap U_b &\to \mathbb{C}, \\
p &\mapsto \det\left(\frac{\partial z_{a,i}}{\partial z_{b,j}}(p)\right)_{1 \le i,j \le n}.
\end{align*}
Then
\begin{align*}
\Omega_a = J_{ab}\,\Omega_b.
\end{align*}
Since $f_a=u_{ab}f_b$, differentiating in the normal coordinate direction and restricting to $D$ gives
\begin{align*}
\frac{\partial z_{a,n}}{\partial z_{b,n}}\bigg|_D = u_{ab}\big|_D,
\end{align*}
while differentiating along tangent directions gives
\begin{align*}
\frac{\partial z_{a,n}}{\partial z_{b,j}}\bigg|_D = 0
\end{align*}
for $1 \le j \le n-1$. Therefore, along $D$,
\begin{align*}
J_{ab}\big|_D = \det(A_{ab})\, u_{ab}\big|_D.
\end{align*}
It follows that
\begin{align*}
(\Omega_a \otimes e_a)\big|_D
=
\det(A_{ab})\,(\Omega_b \otimes e_b)\big|_D.
\end{align*}
[guided]
The divisor line bundle $\mathcal{O}_X(D)$ is locally generated by the meromorphic section with one simple pole along $D$. In the chart $U_a$, the divisor is defined by
\begin{align*}
f_a(p)=z_{a,n}(p),
\end{align*}
so a local frame of $\mathcal{O}_X(D)$ is denoted by $e_a=1/f_a$.
On an overlap $U_a \cap U_b$, the two defining functions define the same smooth divisor, so they differ by a nowhere-vanishing holomorphic unit:
\begin{align*}
f_a = u_{ab} f_b,
\end{align*}
where
\begin{align*}
u_{ab}: U_a \cap U_b \to \mathbb{C}^\times
\end{align*}
is holomorphic. Therefore
\begin{align*}
e_a = \frac{1}{f_a} = \frac{1}{u_{ab}f_b} = u_{ab}^{-1}e_b.
\end{align*}
Now compare the canonical bundle transition functions. Define
\begin{align*}
J_{ab}(p)=\det\left(\frac{\partial z_{a,i}}{\partial z_{b,j}}(p)\right)_{1 \le i,j \le n}.
\end{align*}
Then
\begin{align*}
\Omega_a = J_{ab}\Omega_b.
\end{align*}
The key point is that $J_{ab}$ splits into a tangential determinant and a normal factor along $D$. Since
\begin{align*}
z_{a,n}=f_a=u_{ab}f_b=u_{ab}z_{b,n},
\end{align*}
we differentiate with respect to $z_{b,j}$. For $1 \le j \le n-1$,
\begin{align*}
\frac{\partial z_{a,n}}{\partial z_{b,j}}
=
\frac{\partial u_{ab}}{\partial z_{b,j}}z_{b,n}
+
u_{ab}\frac{\partial z_{b,n}}{\partial z_{b,j}}
=
\frac{\partial u_{ab}}{\partial z_{b,j}}z_{b,n},
\end{align*}
and this restricts to $0$ on $D$ because $z_{b,n}=0$ there. For the normal direction,
\begin{align*}
\frac{\partial z_{a,n}}{\partial z_{b,n}}
=
\frac{\partial u_{ab}}{\partial z_{b,n}}z_{b,n}
+
u_{ab},
\end{align*}
so restriction to $D$ gives
\begin{align*}
\frac{\partial z_{a,n}}{\partial z_{b,n}}\bigg|_D = u_{ab}\big|_D.
\end{align*}
Thus the full Jacobian matrix is block upper triangular along $D$, with tangential block $A_{ab}$ and normal entry $u_{ab}|_D$. Hence
\begin{align*}
J_{ab}\big|_D = \det(A_{ab})\,u_{ab}\big|_D.
\end{align*}
Combining this with $e_a=u_{ab}^{-1}e_b$, we obtain
\begin{align*}
(\Omega_a\otimes e_a)\big|_D
=
(J_{ab}\Omega_b \otimes u_{ab}^{-1}e_b)\big|_D
=
\det(A_{ab})(\Omega_b\otimes e_b)\big|_D.
\end{align*}
This is exactly the same transition function as the one computed for $K_D$.
[/guided]
[/step]
[step:Glue the local identifications into the adjunction isomorphism]
For every $a \in A$, define a holomorphic line bundle map over $V_a$
\begin{align*}
\Phi_a: K_D|_{V_a} &\to \left(K_X \otimes \mathcal{O}_X(D)\right)|_{V_a}, \\
\omega_a &\mapsto (\Omega_a \otimes e_a)|_{V_a}.
\end{align*}
Both $\omega_a$ and $(\Omega_a \otimes e_a)|_{V_a}$ are local frames, so $\Phi_a$ is an isomorphism on $V_a$.
On $V_a \cap V_b$, the previous two steps show that
\begin{align*}
\omega_a = \det(A_{ab})\omega_b
\end{align*}
and
\begin{align*}
(\Omega_a \otimes e_a)|_D
=
\det(A_{ab})(\Omega_b \otimes e_b)|_D.
\end{align*}
Therefore $\Phi_a=\Phi_b$ on $V_a \cap V_b$. The maps $\Phi_a$ glue to a global holomorphic line bundle isomorphism
\begin{align*}
\Phi: K_D &\to \left(K_X \otimes \mathcal{O}_X(D)\right)|_D.
\end{align*}
This proves
\begin{align*}
K_D \cong \left(K_X \otimes \mathcal{O}_X(D)\right)|_D.
\end{align*}
[/step]
[step:Identify $\mathcal{O}_X(D)$ with $L$ when $D$ is the zero divisor of a section]
Assume now that $L \to X$ is a holomorphic line bundle and that $s \in H^0(X,L)$ has zero divisor $D$. Choose, on each $U_a$, a holomorphic frame
\begin{align*}
\ell_a: U_a &\to L|_{U_a}
\end{align*}
such that
\begin{align*}
s = f_a \ell_a.
\end{align*}
Define a local holomorphic bundle map
\begin{align*}
\Psi_a: \mathcal{O}_X(D)|_{U_a} &\to L|_{U_a}, \\
e_a &\mapsto \ell_a.
\end{align*}
On $U_a \cap U_b$, the equality $f_a=u_{ab}f_b$ and the identity $s=f_a\ell_a=f_b\ell_b$ imply
\begin{align*}
\ell_a = u_{ab}^{-1}\ell_b.
\end{align*}
Since $e_a=u_{ab}^{-1}e_b$, the maps $\Psi_a$ agree on overlaps. Hence they glue to a holomorphic line bundle isomorphism
\begin{align*}
\Psi: \mathcal{O}_X(D) &\to L.
\end{align*}
Restricting to $D$ and tensoring with $K_X|_D$ gives
\begin{align*}
\left(K_X \otimes \mathcal{O}_X(D)\right)|_D
\cong
\left(K_X \otimes L\right)|_D.
\end{align*}
Combining this with the adjunction isomorphism already proved yields
\begin{align*}
K_D \cong \left(K_X \otimes L\right)|_D.
\end{align*}
[/step]