Consider $k$ an algebraically closed field. $R=k[y,1/y,z]$ and $K=\mathrm{Frac}(R)$. Denote by $\mathrm{Cl}(R)$ the divisor class group of $\mathrm{Spec}(R)$ where $\mathrm{Cl}(R)=\mathrm{Div}(R)/(K^\star)$, $\mathrm{Div}$ is the abelian group generated by Weil divisors and $K^\star$ is the principal divisor generated by rational functions.
The book claims
Since $k[y,1/y,z]$ is a UFD, we obtain $\mathrm{Cl}(R)=0$.
$\textbf{Q:}$ I do not see UFD alone necessarily deduces $\mathrm{Cl}(R)=0$. However, it seems that the argument can be generalized to $\mathbb A^n\setminus\{x_1=0\}$ where $x_1$ is one of the coordinate. Consider a prime divisor $D$ of $\mathrm{Spec}(R)$. Then $D$ corresponds to $V(F)$ for some $F\in R$ where $F$ is irreducible. Thus every linear combination of prime divisor corresponds to product of their defining polynomials raised to corresponding multiplicities. So I see every Weil divisor is principal. Hence, $\mathrm{Cl}(R)=0$. In the process, I did use the structure of ht 1 prime ideals structure theorem for polynomial rings. So I think, UFD alone itself can't deduce $\mathrm{Cl}(R)=0$, but it requires polynomial ring structural result.
$\textbf{Q':}$ This computation is a step in the computation of $\mathrm{Cl}(\mathrm{Spec}(k[x,y,z]/(xy-z^2))=\mathbb Z_2$. Why did the book choose $y=0$ divisor as a good reference? This seems a very ad hoc choice. In computation of $\mathrm{Cl}(P^n_k)\cong\mathbb Z$, there is a good choice by any hyperplane $H$ (or just choose $H=\{x_0=0\}$ as reference for computation of divisor group structure). Is there any good reason for such a choice?
Ref. Ueno, Algebraic Geometry 3, Chapter 7, Example 7.40.