I just started studying smooth manifolds. The definition of a topological manifold requires a topological space to be locally Euclidean: homeomorphic to $\mathbb{R}^n$.
I know some examples, like how a 2-sphere is locally homeomorphic to $\mathbb{R}^2$. In this case we have an intuitive notion of why $n=2$.
Question: for a general topological space, how do we know what $n$ to choose?
Usually the assumption will state that a manifold is $n$-dimensional. In other cases, it will state that the manifold is given by level sets, or by gluing together other manifolds, and should still usually be clear which $n$ to choose. You mention the sphere as a clear example. Another example that is easy is the projective space, or the graph of a continuous function.