With aligned you're allowed to have several pairs of right- and left-aligned columns, with space between the pairs.
You can exploit the fact that the parenthesized expressions all have the same width and that the first column in aligned is right aligned, so alignment will be automatic
\[
\begin{aligned}
\Delta=(X_4-X_3)(X_4-X_2)(X_4-X_1)\\
(X_3-X_2)(X_3-X_1)\\
(X_2-X_1)
\end{aligned}
\]
but please remember that $$ is never to be used
in a LaTeX document environment. If you know
what you're doing, there are selected situations where
an environment may be defined using $$, but this
requires having read the TeXbook at least ten times.
Full example, where I added a comparison with align* to show that you should use aligned whenever possible.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
You can exploit the fact that the parenthesized expressions
all have the same width and that the first column in
\texttt{aligned} is right aligned, so alignment will be
automatic
[
\begin{aligned}
\Delta=(X_4-X_3)(X_4-X_2)(X_4-X_1)\
(X_3-X_2)(X_3-X_1)\
(X_2-X_1)
\end{aligned}
]
but please remember that \verb|$$| is never to be used
in a \LaTeX\ \texttt{document} environment. If you know
what you're doing, there are selected situations where
an environment may be defined using \verb|$$|, but this
requires having read the \TeX book at least ten times.
You can exploit the fact that the parenthesized expressions
all have the same width and that the first column in
\texttt{align} is right aligned, so alignment will be
automatic
\begin{align}
\Delta=(X_4-X_3)(X_4-X_2)(X_4-X_1)\
(X_3-X_2)(X_3-X_1)\
(X_2-X_1)
\end{align*}
but you can notice a difference with the previous display
in that the vertical spacing is bigger here.
\end{document}

Use alignedat for multiple alignment points in case you cannot count on the natural width of the objects. This also creates pairs of right- and left-aligned columns, but adds no space between them.
\documentclass{article}
\usepackage{amsmath}
\begin{document}
You can also use \texttt{alignedat}, but it's really
overkill
[
\begin{alignedat}{3}
\Delta=(X_4-X_3)&&(X_4-X_2)&&(X_4-X_1)\
&&(X_3-X_2)&&(X_3-X_1)\
&& &&(X_2-X_1)
\end{alignedat}
]
\end{document}

&'s per row is2 x <number of alignments> - 1, so if you have two alignments you need 3 &s on each line. (2) Aligned adds space between alignments, if you do not want that usealignedatand remember it takes a mandatory argument. – daleif Oct 11 '23 at 11:04$$in the regular LaTeX, even though markdown editors which implement MathJax promote$$. You should use\[...\], instead. See this question for more info. – Celdor Oct 11 '23 at 11:21