Let $Y$ be a nonsingular closed subvariety of $\mathbb{P}_k^n$. It should be obvious that $\Gamma(Y, \mathcal{O}_Y(-1)) = 0$ but I can't prove it. I have two ideas: the first one is to calculate the global sections of $\widetilde{S(-1)}$, where $S = k[x_0,\dots,x_n]/I$. We can prove $\mathcal{O}_{\mathbb{P}_k^n}(-1)$ has no global section in this way, but I'm not sure how calculation can be done as $S$ is not a polynomial ring now.
Second idea is suggested here: Pullback of line bundle of negative degree has no global sections. But I don't know if I correctly understand this. We have $\text{Cl } Y \simeq \text{Pic } Y$ so an invertible sheaf $\mathcal{O}(-1)$ corresponds to some divisor $Z$, and its global sections' divisor of zeros are effective divisors, linearly equivalent to $Z$. As $\mathcal{O}(-1)$ is dual of $\mathcal{O}(1)$, linear equivalent class of $-Z$ corresponds to the trace of hyperplance sections of $\mathbb{P}_k^n$, so $Z = -Y.H$ and this is never effective, we conclude that $\mathcal{O}(-1)$ has no global section.
But this feels quite vague to me, especially I don't know what is the correct definition of $Y.H$. I am studying Hartshorne and I've only seen this for limited case, for example, when $Y$ is a hypersurface. Furthermore, there is a remark on Hartshorne that trace of linear system might not be complete, so maybe we could miss some effective divisor in this way?
I need this for solving Hartshorne problem II.9.1. Any help would be appreciated.