Artificial intelligent assistant

Why the kernel of the restriction map $\text{Pic}^0(X)\to \text{Pic}(U)$ is finitely generated? Let $X$ be a smooth and geometrically connected projective curve over a field $k$ and $U$ be a non-empty open subset of $X$. Let $\text{Pic}^0(X)$ be the degree $0$ Picard group of $X$ and $\text{Pic}(U)$ be the Picard group of $U$. We can consider the canonical restriction homomorphism $\alpha: \text{Pic}^0(X)\to \text{Pic}(U) $. According to Qing Liu's "Algebraic geometry and arithmetic curves" Chapter & Exercise 4.9 Part (c) there exists an exact sequence of groups $$ 0\to G\to \text{Pic}^0(X)\overset{\alpha}\to \text{Pic}(U)\to H\to 0 $$ where $G$ and $H$ are finitely generated. The finite-generatedness of $H$ can be obtained by Part (a) and (b) of the same exercise. My question is: how to prove $G$ is finitely generated?

I'll assume $k$ is algebraically closed.
Remember that on a smooth curve $C$ the divisor class $[D]\in \text{Pic}(C)$ of a divisor $D$ is zero if and only if $D=\text{div}(f)$ for some rational function $f\in \text{Rat}(C)$.
In your case, writing $U=X\setminus \\{p_1,\cdots p_r\\}$, it follows that the kernel of the restriction map $ \text{Pic}^0(X)\to \text{Pic}(U) $ is included in the abelian subgroup of $\text{Pic}(X)$ generated by $[p_1],\cdots,[p_r]$ and is thus finitely generated.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 42dc2df08dac230458ecd061d3058fdc