$mod4$ gives $x=2y$
If $y>=5$ then $(3^y+1)^2>3^{2y}+4y^2+135>(3^y)^2$
For $x=2$ we have $3^x+x^2+135=148$ contradiction
For $x=4$ we have $3^x+x^2+135=232$ contradiction
For $x=6$ we have $3^x+x^2+135=900$ wich is a sollution
For $x=8$ we have $3^x+x^2+135=6760$ contradiction
I claim $x=6$ is the only answer.
Note that by modulo $4$, $x$ is even. So, setting $x=2k$ we find $3^{2k}+(2k)^2+135=\ell^2$ for some $\ell$, yielding
\[
(\ell-3^k)(\ell+3^k) = 4k^2+135\implies \ell+3^k\mid 4k^2+135\implies 3^k<4k^2+135.
\]This yields easily $k<5$, and easy casework gives $x=6$ to be only solution.
Modulo 4 gives even $\rightarrow x=2a$
Now
$k^2-(2a)^2=3^{2a}+135 \rightarrow = 27\cdot 3^{2a-3}+5$
Gcd is equal to $1$ so we may proceed cases aheqd
For a= 2 no solution let a$\ge 3 $ so $\rightarrow k+2a=3^{2a-3}+5$ and..
$k-2a= 27$
No solutions from here thus we can check for $a \le 3 $ and thus $ x=6 $ is the only solution