The point of the axiom of extensionality is to avoid the situation where the way in which the set is defined, not just its members, affects which sets contain the set. So to make extensionality fail you will just need a model in which there are two sets $A,B$ which have the same elements but are not equal.
The easiest way to do this is to take any set $A$, make a copy of it, color one copy red, and color the other copy blue. Declare that any set that was a member of $A$ is a member of both red-$A$ and blue-$A$, and that any set which contained $A$ contains both red-$A$ and blue-$A$. Then the resulting thing will still be a model of ZFC in the language with just $\in$ (without $=$ yet).
The point of the axiom of extensionality is then to say that this situation does not occur: there are not two sets which are somehow different despite having all the same elements.
In fact, a modification of the axiom of extensionality lets us define $=$ in terms of $\in$, by declaring that two sets will be regarded as equal if they have all the same members. To make this work, we rewrite the axiom of extensionality without $=$ as:
(\forall x)(x \in A \Leftrightarrow x \in B) \Rightarrow (\forall y)(A \in y \Leftrightarrow B \in y)
Then we can define
A = B \Leftrightarrow (\forall x)(x \in A \Leftrightarrow x \in B)
and we can prove the substitution axioms for equality in terms of the equality-free axiom of extensionality and the definition of $=$.
This can be done in any model of ZFC in the language with just $\in$ (satisfying the modified version of extensionality) to obtain a model of ZFC in the language ($\in$, $=$), including the usual axiom of extensionality. But here $=$ may not be interpreted as the true equality relation, for example if the original model had red sets and blue sets. If we want the $=$ symbol to be interpreted as actual equality, we have to mod out by the equivalence relation induced by the interpretation of $=$ in our model. In the setting where $=$ is treated as a logical symbol which must be interpreted as true equality, the point of the axiom of extensionality is to ensure that this modding-out has already been performed: if we would define to sets to be "equal" in this indirect way, then they are already equal.