Ordinary mathematics is typically taken to occur in ZFC, where the "basic notion" is the elementhood relation $\in$. Given any $a$ and $b$, it makes sense to ask whether $a \in b$ or whether $a = b$.
This leads to some undesirable results. For example, we would like two spaces $X$ and $Y$ which are homeomorphic to be totally indistinguishable. However, this is not the case - for example, $\mathbb{R}$ and $(0, 1)$ are distinguished by whether $2$ is a point in the space. It also allows us to ask silly questions, like "Is $1$ an element of $\cos$?" or "What is the intersection of $e$ and $\mathbb{C}$?", which shouldn't even have answers to begin with.
To get around this, we can reformulate the axioms of set theory purely in terms of functions. Here, we have a primitive notion of sets (denoted with capital letters). Given sets $A$ and $B$, we have a primitive notion of functions between $A$ and $B$ (written with lowercase letters $f : A \to B$), and we have a primitive notion of function composition (given $f : A \to B$, $g : B \to C$, we have $g \circ f : A \to C$). We also are only permitted to write $a = b$ when $a$ and $b$ are functions with the same domain and codomain - there is no notion of equality of sets.
The first axioms we use are those of category theory. We assume, for all $A$, the existence of an identity arrow $1_A$ which is a left and right identity for composition. We assume associativity of composition.
We then posit the existence of a 1-element set $1$ satisfying the axiom $\forall A \exists! f : A \to 1$. In the usual manner of Category Theory, we then posit the existence of Cartesian Products and equalisers. We also introduce the idea of power sets as "power objects", giving us a topos.
Finally, we introduce some notation. The "elements of $A$" are defined to be the functions $1 \to A$, and we define the notation $x :\in A$ to mean $x : 1 \to A$. Given $x :\in A$ and $f : A \to B$, we define $f(x) :\in B$ to be $f \circ x$.
We then add the axiom of function extensionality, which states $\forall A \forall B \forall f, g : A \to B, (\forall x :\in A, f(x) = g(x)) \to g = f$.
Once we've defined "elements", we can define "$f : A \to B$ is surjective" to mean $\forall b :\in B \exists a :\in A, f(a) = b$. We then state and assume the axiom of choice: for all surjective $f : A \to B$, there is some $g : B \to A$ such that $f \circ g = 1_B$.
At this point, we have a theory known as ETCS. We can add the axiom scheme of replacement to this theory (formulated appropriately in the language of category theory) to get a theory ETCSR such that the following statement is true:
Thm. For any sentence $\phi$ in the language of ETCSR, $ETCSR \vdash \phi$ if and only if ZFC proves that $\phi$ holds in the category of sets. Thus, ZFC and ETCSR are "equivalent".
Now, we can formalise the notion of "isomorphism invariance of truth". Note that in the next two paragraphs, when we discuss "equality", we are discussing syntactic equality of variable names in the metatheory.
Consider object variables $O_i$, where $i$ ranges from $1$ to $n$, and consider object variables $P_j$ and $Q_j$ where $j$ ranges from $n + 1$ to $n + k$. Let $P_j = Q_j = O_j$ whenever $1 \leq j \leq n$, so that $P_j$ and $Q_j$ are defined for all $j$ from $1$ to $n + k$.
Consider arrow variables $f_i : O_{d_i} \to O_{c_i}$, where $i$ ranges from $1$ to $m$, and where for all such $i$, we have $1 \leq d_i, c_i \leq n$. Consider arrow variables $g_j : P_{d_j} \to P_{c_j}$ and $h_j : Q_{d_j} \to Q_{c_j}$, where $j$ ranges from $m + 1$ to $m + w$ and where $1 \leq d_j, c_j \leq n + k$ for all such $j$. Define $g_j = f_j = h_j$ for all $1 \leq j \leq m$.
Finally, consider arrow variables $v_j : P_j \to Q_j$ for $n + 1 \leq j \leq n + k$. Define $v_i = 1_{O_i}$ for $1 \leq i \leq n$.
Let $\phi$ be any statement whose free variables consist only of the $O$s, $P$s, $f$s, and $g$s (and not of the $Q$s, $h$s, or $v$s). Then using only the axioms of identity arrows and associativity of composition, we can prove the universal closure of the following:
Suppose that for all $j$ such that $n + 1 \leq j \leq n + k$, $v_j$ is an isomorphism. Further suppose that for all $i$ such that $m + 1 \leq i \leq m + k$, we have that $h_i \circ v_{d_i} = v_{c_i} \circ g_i$. Then $\phi \iff \phi[P \mapsto Q, g \mapsto h]$.
This statement is known as the "isomorphism invariance of truth", and it can be proven by a simple structural induction on $\phi$.
Here are some applications of the isomorphism invariance of truth:
Consider a terminal object $A$ and an isomorphism $f : A \to B$. Then $B$ is a terminal object.
Proof: We take $P_1 = A$, $Q_1 = B$, and $v_1 = f$ and apply isomorphism invariance of truth.
Consider maps $f, g : A \to B$ and an equaliser $e : X \to A$. Now consider an isomorphism $h : B \to C$. Then $e$ is also the equaliser of $h \circ f, h \circ g : A \to C$.
Proof: We can rephrase this as follows:
Given arrows $f, g : A \to B$ and arrows $f', g' : A \to X$, if there is an isomorphism $h : B \to X$ such that $f' = h \circ f$ and $g' = h \circ f$, then $e$ is the equaliser of $f$ and $g$ iff $e$ is the equaliser of $g'$ and $h'$. This follows immediately from isomorphism invariance of truth. Apply the above to the case $f' = h \circ f$ and $g' = h \circ g$.
Now, let's turn out attention to topological spaces. Notice that a topological space consists of some set $X$ and some subset $\tau_X \subseteq PX$ satisfying some properties. Note that a homeomorphism $f : X \to Y$ is an isomorphism; it therefore induces an isomorphism $PX \to PY$ which in turn induces an isomorphism between the subsets $\in_X \subseteq X \times PX$ and $\in_Y \subseteq Y \times PY$ that "plays nicely" with the induced isomorphism $X \times PX \to Y \times PY$. Because $f$ is a homeomorphism, it will also induce an isomorphism $\tau_X \to \tau_Y$ which plays nicely with the other isomorphisms. This gives us enough for isomorphism invariance.
Therefore, any structural property at all - that is, any property that can be stated purely in terms of the category of sets - is automatically homeomorphism invariant. This includes everything we could possibly care about - metrizability, compactness, 2nd-countability, being a manifold of dimension $n$, the various separation axioms, and more. Algebraic invariants like homotopy groups, homology, and cohomology are also preserved, as are properties of the categories of presheaves and sheaves on the space.
The only things homeomorphisms can fail to preserve in ZFC are those which cannot be phrased in terms of the category of sets - things like "Is $2$ an element of the underlying space?" But if we work in ETCSR (or a weaker theory), we can't even phrase these questions to begin with.