12. Given a function $f(x)$ defined on $\mathbf{R}$ that satisfies: $f(1)=\frac{10}{3}$, and for any real numbers $x, y$, it always holds that $f(x) f(y)=f(x+y)+f(x-y)$. If the sequence $\left\{a_{n}\right\}$ satisfies $a_{n}=3 f(n)-f(n-1), n \in \mathbf{N}^{*}$.
(1) Find the general term formula for the sequence $\left\{a_{n}\right\}$;
(2) Let $b_{n}=\frac{24 a_{n}}{\left(3 a_{n}-8\right)^{2}}, n \in \mathbf{N}^{*}, S_{n}$ be the sum of the first $n$ terms of the sequence $\left\{b_{n}\right\}$, prove that $S_{n}<1$.
(1) Let $y=0, x=1$, then we have $f(0) \cdot f(1)=2 f(1) \Rightarrow f(0)=2$.

Let $x=n, y=1$, then we have $\frac{10}{3} f(n)=f(n+1)+f(n-1)$ $\Rightarrow 10 f(n)=3 f(n+1)+3 f(n-1) \Rightarrow 3 f(n+1)-f(n)=9 f(n)-3 f(n-1) \Rightarrow a_{n+1}=3 a_{n}$, and $a_{1}=3 f(1)-f(0)=8$, so $a_{n}=8 \cdot 3^{n-1}, n \in \mathbf{N}^{*}$.
(2) $b_{n}=\frac{8^{2} \cdot 3^{n}}{\left(8 \cdot 3^{n}-8\right)^{2}}=\frac{3^{n}}{\left(3^{n}-1\right)^{2}}$.

Notice that $3^{k}-1 \geqslant \frac{1}{4}\left(3^{k+1}-1\right) \Leftrightarrow 3^{k+1}-1 \leqslant 4\left(3^{k}-1\right)=3^{k+1}+3^{k}-4 \Leftrightarrow 3^{k}-3 \geqslant 0$,
thus $b_{k} \leqslant \frac{4 \cdot 3^{k}}{\left(3^{k}-1\right)\left(3^{k+1}-1\right)}=2\left(\frac{1}{3^{k}-1}-\frac{1}{3^{k+1}-1}\right)$
$\Rightarrow S_{n} \leqslant 2\left(\frac{1}{2}-\frac{1}{3^{n+1}-1}\right)=1-\frac{2}{3^{n+1}-1}<1$.