Let the sum of the coefficients of the first three terms in the expansion of $\left(x-\frac{3}{x^2}\right)^n, x \neq 0 n \in N$, be $376$. Then the coefficient of $x^4$ is ______