I am just writing my comment as an answer. Probably this example has appeared before on MO. Let $\mathbb{P}^3_k$ denote the projective space $\text{Proj}\ k[s_1,s_2,t_1,t_2]$. Let $\overline{X}$ denote the closed, reduced subscheme $$\overline{X} =\text{Zero}(s_1s_2) = \overline{X}_1 \cup \overline{X}_2, \ \ \overline{X}_1 = \text{Zero}(s_2), \ \ \overline{X}_2 = \text{Zero}(s_1).$$ This is a union of two hyperplanes, $\overline{X}_1$ and $\overline{X}_2,$ whose intersection is a line, $$\overline{L} = \overline{X}_1\cap \overline{X}_2 = \text{Zero}(s_1,s_2) = \text{Proj} \ k[t_1,t_2].$$ Inside $\overline{X}_1$, define $C_1$ to be the closed subscheme that is a line, $$C_1 = \text{Zero}(s_2,t_1).$$ Inside $\overline{X}_2$, define $C_2$ to be the closed subscheme that is a line, $$C_2=\text{Zero}(s_1,t_2).$$ Note that $C_1\cap \overline{X}_2$ is the singleton set of $p_2=[0,0,0,1]$, and $C_2\cap \overline{X}_1$ is the singleton set of $p_1=[0,0,1,0].$ Define $C$ to be the closed union of $C_1$ and $C_2$ in $\overline{X}$. Define $X$ to be the open complement in $\overline{X}$ of the closed subset $C$. By construction, $X$ is quasi-projective. Moreover, $X$ is the union of the two irreducible components, $$X_1 = \overline{X}_1\setminus(C_1\cup \{p_1\}), \ \ X_2 = \overline{X}_2 \setminus (C_2\cup \{p_2\}).$$ The intersection of the two irreducible components is $$L=\overline{L}\setminus\{p_1,p_2\}.$$ Each of the two irreducible components is isomorphic to a punctured affine plane. In particular, $\mathcal{O}_{X_1}(X_1)$ equals $k[s_1/t_1,t_2/t_1]$. Similarly, $\mathcal{O}_{X_2}(X_2)$ equals $k[s_2/t_2,t_1/t_2]$. Finally, the intersection $L$ is a twice-punctured projective line with coordinate ring $\mathcal{O}_L(L)$ equal to $k[t_2/t_1,t_1/t_2]$. The restriction map $\rho_1$, resp. $\rho_2$, to $\mathcal{O}_L(L)$ from $\mathcal{O}_{X_1}(X_1)$, resp. from $\mathcal{O}_{X_2}(X_2)$, is the $k$-algebra map that sends $s_1/t_1$ to $0$, resp. that sends $s_2/t_2$ to $0$, and that sends $t_2/t_1$ to itself, resp. that sends $t_1/t_2$ to itself. The fibre product of these restriction maps is the $k$-algebra $$\mathcal{O}_X(X) = \{(f_1,f_2)\in \mathcal{O}_{X_1}(X_1)\times \mathcal{O}_{X_2}(X_2) : \rho_1(f_1) = \rho_2(f_2)\}.$$ This is infinitely generated as a $k$-algebra by the following monomials, $$\frac{s_1}{t_1}, \ \frac{s_2}{t_2}, \ \left(\frac{s_1^mt_2}{t_1^{m+1}}\right)_{m\geq 1}, \left(\frac{s_2^nt_1}{t_2^{n+1}}\right)_{n\geq 1}. $$ In particular, the image in $\mathcal{O}_L(L)$ of $\mathcal{O}_X(X)$ equals the constant subfield $k$. Thus, $X$ is not quasi-affine.