Example 1 Given that all terms of the sequence $\left\{a_{n}\right\}$ are positive, and the sum of the first $n$ terms $S_{n}$ satisfies $6 S_{n}=a_{n}^{2}+$ $3 a_{n}+2$. If $a_{2} 、 a_{4} 、 a_{9}$ form a geometric sequence, find the general term formula of this sequence.
When $n=1$, by the problem, we have $6 a_{1}=a_{1}^{2}+3 a_{1}+2$, thus $a_{1}=1$ or $a_{1}=2$.
When $n \geqslant 2$, we have
\[
\begin{array}{c}
6 S_{n}=a_{n}^{2}+3 a_{n}+2 \\
6 S_{n-1}=a_{n-1}^{2}+3 a_{n-1}+2
\end{array}
\]

Subtracting the two equations gives $\left(a_{n}+a_{n-1}\right)\left(a_{n}-a_{n-1}-3\right)=0$. By the problem, all terms of $\left\{a_{n}\right\}$ are positive, so $a_{n}-a_{n-1}=3$. When $a_{1}=1$, $a_{n}=1+3(n-1)=3 n-2$, at this time $a_{4}^{2}=a_{2} \cdot a_{9}$ holds; when $a_{1}=2$, $a_{n}=2+3(n-1)=3 n-1$, at this time $a_{4}^{2}=a_{2} \cdot a_{9}$ does not hold, so $a_{1}=2$ is discarded. Therefore, $a_{n}=3 n-2$.