solutions of the equation $x^3-y^3=z!-18$ What are the solutions of the equation $x^3-y^3=z!-18$? Here $x,y,z$ are non-negative integers. I have tried brute force but is there a better method?

You can even solve this if $x,y,z\in\mathbb Z$ can also be negative. Note that $z!$ is never defined when $z<0$.
By Fermat's Little Theorem for all $a\in\mathbb Z$ we have $a^6\equiv 0,1\pmod{7}$ and so $a^3\equiv -1,0,1\pmod{7}$.
If $z\ge 7$, then $$x^3-y^3\equiv 0-18\equiv 3\pmod{7},$$ impossible, because $$x^3-y^3\equiv -2,-1,0,1,2\pmod{7}$$
Therefore $0\le z\le 6$. Then you can analyse each $7$ (or $6$, since $0!=1!$) case by using factorization:
$$x^3-y^3=(x-y)\left(x^2+xy+y^2\right)=t$$
for an integer $t$. One thing that will help is that $$x^2+xy+y^2=\frac{1}{4}(2x+y)^2+\frac{3}{4}y^2\ge 0$$
You'll solve systems of equations. E.g., if $z=4$, then $$(x-y)\left(x^2+xy+y^2\right)=6$$
and the cases are $x-y=6$, $x^2+xy+y^2=1$
or $x-y=3$, $x^2+xy+y^2=2$
or $x-y=2$, $x^2+xy+y^2=3$
or $x-y=1$, $x^2+xy+y^2=6$.
Which is $4$ systems of equations. E.g., in the first one, $y=x-6$ and so $x^2+x(x-6)+(x-6)^2=1$ is a simple quadratic equation in terms of $x$.
Another method here is noticing increase of differences between consecutive cubes. $2^3-1^3>6$ and $1^3-(-1)^3<6$ and $(-1)^3-(-2)^3>6$.
From the other answer you can tell that $z\not\in\{3,4,5\}$ by noticing that if $z\ge 3$, then $3\mid x^3-y^3$, but by Fermat's Little Theorem then $3\mid x-y$, and also $x^2+xy+y^2\equiv 3x^2\equiv 0\pmod{3}$, so $9\mid z!$, so $z\ge 6$.
