Corollary 3.3 in Chapter IV of "Ample subvarieties of algebraic varieties" by R. Hartshorne asserts the following:
Let $X$ be a smooth projective variety and $Y\subset X$ a smooth subvariety of dimension at least three. Assume that $Y$ is a strict complete intersection in $X$ then the natural map $$ Pic(X)\rightarrow Pic(Y) $$ is an isomorphism.
Now, take $X = \mathbb{P}^1_{(x_0,x_1)}\times\mathbb{P}^n_{(y_0,\dots,y_n)}$ with $n\geq 3$, and $Y = \{x_0 = 0\}\subset X$. Then $Y\cong\mathbb{P}^n$ is a complete intersection in $X$ but $X$ has Picard rank $2$ while $Y$ has Picard rank $1$ so that $Pic(X)\rightarrow Pic(Y)$ can not be an isomorphism.
What am I misunderstanding in Hartshorne's statement?