2. $S$ is a subset of the set $\{1,2, \cdots, 2023\}$, satisfying that the sum of the squares of any two elements is not a multiple of 9, then the maximum value of $|S|$ is $\qquad$. (Here $|S|$ denotes the number of elements in $S$)
When $x \equiv 0$, $x^{2} \equiv 0(\bmod 9)$; when $x \equiv \pm 1$, $x^{2} \equiv 1(\bmod 9)$;
when $x \equiv \pm 2$, $x^{2} \equiv 4(\bmod 9)$; when $x \equiv \pm 3$, $x^{2} \equiv 0(\bmod 9)$;
when $x \equiv \pm 4$, $x^{2} \equiv 7(\bmod 9)$.
Then, except for multiples of 3, the sum of squares of any two numbers is not a multiple of 9, so $S$ contains at most one multiple of 3, i.e., $|S| \leqslant 2023-674+1=1350$.