Let $G(k, n)$ be the Grassmannian of $k$-dimensional subspaces of $K^{n}$, $K$ a field, embedded in $\mathbb{P}^{N}$ by the Plücker embedding. In Harris' Algebraic Geometry, A First Course, Theorem 10.19 states that

$$\mathrm{Aut}(G(k, n)) = \mathrm{Aut}(G(k, n), \mathbb{P}^{N}),$$ where $\mathrm{Aut}(G(k, n), \mathbb{P}^{N}) := \{ T \in \mathrm{Aut}(\mathbb{P}^{N}) \mid T(G(k, n)) = G(k, n) \}$. In his proof, Harris says that it comes down to the assertion that every codimension $1$ subvariety of $G(k, n)$ is the intersection of $G(k, n)$ with a hypersurface in $\mathbb{P}^{N}$. In other words, $\mathrm{Pic}(G(k, n)) \cong \mathrm{Pic}(\mathbb{P}^{N})$, right? How such information can say about the automorphism group of these varieties? Is it true in general? That is, if $Y$ is a subvariety of a variety $X$ and $\mathbb{Pic}(Y) = \mathbb{Pic}(X)$, then every automorphism of $Y$ extends to an automorphism of $X$?

Thank you!