Let $k$ be an algebraically closed field of characteristic $0$. Let $X/k$ be a smooth, projective, connected variety over $k$ of dimension $d$. Let $i: D \subset X$ be an effective divisor isomorphic over $k$ to $\mathbb{P}^{d-1}$. I'm trying to compute the dimension of $H^0(X, \mathcal{O}_X(D))$. Here is what I've tried so far: by Serre Duality, $$H^0(X, \mathcal{O}_X(D)) = H^d(X, \mathcal{O}_X(-D) \otimes_{\mathcal{O}_X} \omega_X)^{\ast}.$$ There is a short exact sequence of $\mathcal{O}_X$-modules given by $$ 0 \to \mathcal{O}_X(-D) \otimes \omega_X \to \omega_X \to i_\ast( \mathcal{O}_D) \otimes \omega_X \to 0.$$ Passing to cohomology, there is an exact sequence $$ H^{d-1}(X, i_\ast( \mathcal{O}_D) \otimes \omega_X) \to H^d(X, \mathcal{O}_X(-D) \otimes \omega_X) \to H^d(X,\omega_X) \to H^d(X, i_\ast( \mathcal{O}_D) \otimes \omega_X).$$
The idea is to use the above exact sequence to compute $h^d(X, \mathcal{O}_X(-D) \otimes \omega_X)$ and the we are done by Serre Duality. We know that $h^d(X, \omega_X) = 1$, which is an encouraging start.
What would be useful now is some isomorphism of the form $$H^r(X, i_\ast( \mathcal{O}_D) \otimes \omega_X) \cong H^r(D,???)$$ as this would give, for example, that $H^d(X, i_\ast( \mathcal{O}_D)\otimes \omega_X) = 0$ (by dimension considerations) and it would probably make things easier as $D \cong \mathbb{P}^{d-1}$. Ideally, $H^{d-1}(X, i_\ast( \mathcal{O}_D)\otimes \omega_X) = 0$ and $H^d(X, i_\ast( \mathcal{O}_D)\otimes \omega_X) = 0$, making the computations super easy (but I'm not sure these both vanish).
However, I'm stuck and I'm not sure that the above strategy is a good one. Help please!