More of an aside than anything, but we will need to distinguish between holomorphic and algebraic Quillen Suslin statements. Grauert's Oka principle can show a vector bundle is holomorphically trivial but on affine varieties holomorphically trivial doesn't imply algebraically trivial.

Expanding on the comments of Starr and Tosteson to illustrate this subtlety: when $X = Y \setminus \{p\}$ is the
complement of a point on a smooth projective curve $Y$ of genus $g>
0$, $\mathrm{Pic}(X) \simeq \mathrm{Pic}(Y) / \mathbb{Z} \simeq
\mathrm{Pic}^{0}(Y)$ where the last isomorphism is obtained from
$\mathrm{Pic}(Y) \simeq \mathrm{Pic}^{0}(Y) \times \mathbb{Z}$ (an
exercise in Hartshorne II.6). On the other hand it is true that all line bundles on $X$ are holomorphically trivial: this can be seen from the exponential exact sequence
$$
\cdots \to H^1(X, \mathcal{O}_X) \to H^1(X, \mathcal{O}_X^\times) \to H^2(X, \mathbb{Z}) \to H^2(X, \mathcal{O}_X) \to \cdots
$$
And vanishing for higher cohomology of $\mathcal{O}_X$ (Cartan AB) and $ H^2(X, \mathbb{Z})$ $X$ is homotopy equivalent to a wedge of $2g$ circles).

# A neccessary conditon

If $X$ is a smooth variety and every algebraic vector bundle on $X$ is
trivial, then $K_{0}(X) = \mathbb{Z}$, generated by the class of
$\mathcal{O}_{X}$, a severe restriction, for instance after tensoring
with $\mathbb{Q}$ we have $\mathrm{CH}^{*}(X) \otimes \mathbb{Q} \simeq
K_{0}(X) \otimes \mathbb{Q} = \mathbb{Q}$.

In the example above a key point was $\mathrm{CH}^*(X) \not \simeq \mathbb{Q}$.

# One answer to the question

A conjecture of Anderson/theorem of Gubeladze shows that if $X$ is an
affine toric variety, then every vector bundle on $X$ is free. The primary source is

I. Gubeladze, The Anderson conjecture and projective modules over monoid algebras, Soobshch. Akad. Nauk Gruzin. SSR 125 (1987), 289–291

anyaffine variety? $\endgroup$1more comment