We assume that a spherically symmetric metric can be written in the form
\begin{equation}
\begin{split}
ds^2 = - e^{2A(t,r)} dt^2 + e^{2B(t,r)} dr^2 + r^2 d\Omega_{D-2}^2 , \qquad d\Omega_{D-2}^2 = \gamma_{ab} d\theta^a d\theta^b
\end{split}
\end{equation}
where $\gamma_{AB}$ is the metric of the unit $S^{D-2}$. This satisfies
$$
R_{\mu\nu} = 0 .
$$
Our goal is to show that the unique solution to this is the Schwarzschild black hole.
The Christoffel symbols are
\begin{equation}
\begin{split}
\Gamma^t_{tt} &= \partial_t A , \qquad \Gamma^t_{tr} = \partial_r A , \qquad \Gamma^t_{ta} = 0 , \qquad \Gamma^t_{rr} = e^{-2(A-B)} \partial_t B , \qquad \Gamma^t_{ra} = \Gamma^t_{ab} = 0 , \\
\Gamma^r_{tt} &= e^{2(A-B)} \partial_r A , \qquad \Gamma^r_{tr} = \partial_t B , \qquad \Gamma^r_{ta} = \Gamma^r_{ra} = 0 , \qquad \Gamma^r_{rr} = \partial_r B , \qquad \Gamma^r_{ab} = - r e^{-2B} \gamma_{ab} , \\
\Gamma^a_{tt} &= \Gamma^a_{tr} = \Gamma^a_{tb} = \Gamma^a_{rr} = 0 , \qquad \Gamma^a_{rb} = \frac{1}{r} \delta^a_b , \qquad \Gamma^a_{bc} = \Gamma^a_{bc}[\gamma] , \\
\Gamma^\rho_{t\rho} &= \partial_t ( A + B ) , \qquad \Gamma^\rho_{r\rho} = \partial_r ( A + B ) + \frac{D-2}{r} , \qquad \Gamma^\rho_{a\rho} = \Gamma^b_{ab}[\gamma] .
\end{split}
\end{equation}
The Ricci tensor components are
\begin{equation}
\begin{split}
R_{tt} &= - \partial_t^2 B + \partial_t B \partial_t ( A - B ) + e^{2(A-B)} \left[ \partial_r A \partial_r ( A - B ) + \partial_r^2 A + \frac{D-2}{r} \partial_r A \right] , \\
R_{tr} &= \frac{D-2}{r} \partial_t B , \\
R_{rr} &= - \partial^2_r A - ( \partial_r A )^2 + \left[ \partial_r A + \frac{D-2}{r} \right] \partial_r B - e^{-2(A-B) } \left[ \partial_t ( A - B ) \partial_t B - \partial_t^2 B \right] , \\
R_{ab} &=e^{-2B} [ - r \partial_r ( A - B ) + ( D - 3 ) ( e^{2B} - 1 ) ] \gamma_{ab} .
\end{split}
\end{equation}
where in the last line, we used that on $S^{D-2}$, we have $R_{ab}[\gamma] = (D-3) \gamma_{ab}$. We now solve Einstein's equations in a vacuum $R_{\mu\nu} = 0$. The second equation implies that $\partial_t B = 0 \implies B = B(r) $. Then, $\partial_t R_{ab} = 0$ implies $\partial_t \partial_r A = 0 \implies A = A(r) + C(t)$. We can set $C(t)=0$ by redefining the coordinate $t$. Next, we look at
\begin{equation}
\begin{split}
R_{rr} + e^{-2(A-B)} R_{tt} = \frac{D-2}{r} \partial_r ( A + B ) \implies A(r) = - B(r) - c .
\end{split}
\end{equation}
We can set $c=0$ by redefining $t$. The remaining equations can all be simplified to
\begin{equation}
\begin{split}
2 r \partial_r B + ( D - 3 ) ( e^{2B} - 1 ) = 0 \implies e^{-2B} = 1 - \frac{c}{r^{D-3}} .
\end{split}
\end{equation}
Putting all this together, we find that the metric takes the form
\begin{equation}
\begin{split}
ds^2 = - f(r) dt^2 + \frac{dr^2}{f(r)} + r^2 d\Omega_{D-2}^2, \qquad f(r) = 1 - \frac{c}{r^{D-3}} .
\end{split}
\end{equation}
This is the Schwarzschild solution in $D$ dimensions.