Let us denote ${x^\alpha}$ as the original coordinates and ${x'^\alpha}$ as the transformed coordinates. There are 4 quantities that undergo <PERSON> transformation in total. First is the volume element $d^4x$. It transforms as $$d^4y=Jd^4x,$$ where $J=\sqrt{g/g'}$ is the Jacobian of the transformation and $g$, as well as $g'$, denote the determinant of the metric tensor in both coordinate systems respectively. In Special Relativity (SR), both determinants are $-1$, since the metric tensor is always the <PERSON> metric in all <PERSON> frames. So the 4-volume $d^4x$ is a <PERSON> scalar. \ The second quantity and the third quantities are the 4-current vector and the partial derivative respectively. 578
You are correct in that the product of these two is a <PERSON> scalar, so we need not to change them. The final quantity is the variable in the Heaviside step function $\theta(x)$. Expanding the expression $\theta(n_{\beta}x^{\beta})$ gives $\theta(t)$ and under a <PERSON> transformation, the Heaviside step function becomes $\theta(at'+bx')$ for some scalars $a$ and $b$. Since the same variable $x$ is used in the expression in $Q'$, then we can express $a t'+b x'$ as $n'\beta x^\beta.$ in which the variable $x$ now denotes the transformed coordinates.\ The 4-current vector can be inserted inside the partial derivative in virtue of expression $(2.2.6)$. Using chain rule, we have $$\partial\alpha J^\alpha{\theta(n'\beta x^\beta)-\theta(n\beta x^\beta)}+J^\alpha\partial_\alpha{\theta(n'\beta x^\beta)-\theta(n\beta x^\beta)},$$ where by $eq.(2.2.6),$ the left hand side vanishes and we recover the original expression for $Q$.\ The term in the Heaviside step function is not a dot product between a contravariant vector and a covariant vector as $n_\beta$ is certainly not a vector. It is just a convenient way to write up the expression. Finally, it might be instructive to see how the $eq.(2.6.8)$ can be converted to the usual expression for electric charge $Q=\int d^3xJ^0(x).$ Expanding the sum in step function $\theta$ gives $$Q=\int d^4xJ^\alpha\partial_\alpha\theta(t).$$ Using $\frac{d\theta}{dx}=\delta(x)$, we have $$Q=\int d^4x J^0\delta(t)=\int d^3x J^0\int dt\delta (t)=\int d^3 J^0.$$ 804