[proofplan]
Apply the Axiom of Foundation to the singleton set $\{x\}$. Foundation gives an element of $\{x\}$ that is disjoint from $\{x\}$; since the only element of $\{x\}$ is $x$, this says $x \cap \{x\} = \varnothing$. If $x \in x$, then $x$ would lie in both $x$ and $\{x\}$, contradicting that disjointness.
[/proofplan]
[step:Apply Foundation to the singleton containing $x$]
Let $x$ be an arbitrary set. Define the singleton set
\begin{align*}
S := \{x\}.
\end{align*}
Then $S$ is nonempty because $x \in S$.
By the Axiom of Foundation applied to the nonempty set $S$, there exists a set $a$ such that
\begin{align*}
a \in S
\quad\text{and}\quad
a \cap S = \varnothing.
\end{align*}
Since $S = \{x\}$, the relation $a \in S$ implies $a = x$. Substituting $a = x$ into the disjointness conclusion gives
\begin{align*}
x \cap S = \varnothing.
\end{align*}
[/step]
[step:Derive the contradiction from self-membership]
Assume, for contradiction, that $x \in x$. Since also $x \in S$ by the definition of $S$, the set $x$ belongs to both $x$ and $S$. Hence
\begin{align*}
x \in x \cap S.
\end{align*}
This contradicts the conclusion $x \cap S = \varnothing$ from the previous step. Therefore the assumption $x \in x$ is false, so $x \notin x$.
Because $x$ was arbitrary, every set is not an element of itself.
[/step]