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?



A question on "Ample subvarieties of algebraic varieties"
I suspect that you are supposed to view the projective variety $X$ as being given with a chosen projective embedding $X\subset \mathbb P^n$, and therefore a distinguished ample divisor $\mathcal{O}\_X(1) = \mathcal{O}\_{\mathbb P^n}(1)|\_X$. Then the complete intersection $Y$ should be cut out by sections of $\mathcal{O}\_X(d)$, rather than any old line bundle on $X$.


(Indeed the problem with your example is that your choice of $Y$ is not an ample divisor on $X$.)


