I'm reading naïve set theory by Halmos and at page 6, while explaining the axiom of specification (and Russell's paradox) he says: "whatever the set A may be, if B={x∈A:x∉x} B∈A is impossible"
then at page 10 he says: The axiom of pairing ensures that every set is an element of some set
so my question is, if every set is an element of some set, how come B={x∈A:x∉x} is not element of A even though A can be any set?
This is a linguistic trap.
If you say $A$ can be any #thing#, once you specify it, it is no longer arbitrary. You have now labelled it as a specific #thing# and even though you know nothing about it everything you do with it now, is not arbitrary but about $A$
Here's a silly example. If you say "Let $A$ be any number". Then we say. Let $B = A-1$ so $B < A$. Now suppose we argue "But we said $A$ could be any number. So $A$ doesn't have to be less than $B$". So it is perfectly possible, in theory, that there is some number where $A -1 \ge A$.
Do you see the problem there?
You argument is much the same. Let $A$ be any set.... but once we label it, it is no longer any set. It is $A$; a specific set. We define $B$ based on $A$ but we can't just change what $A$ is.
....
Analogy. Suppose we claimed: Every number is larger than some number. But ten pages later we claim. Let $B = A-1$. Then we must have $B< A$.
Suppose we argue: But why is $B < A$? $B$ is greater than some number and $A$ can be any number, so why can't $A < B$?
Well, because we already defined $A$ and then we defined $B$. $A$ can't be any number now. It's too late. It could be any number when we brought it up but now it's committed to being $A$.