Supposse we have a compact metric space $(X, d)$. Let $(\text{Iso}(X, d), D)$ be a metric space of all isometries $f : X \rightarrow X$ with a metric $D$ defined with: $$D(f, g) = \text{sup}\{d(f(x), g(x)) \mid x \in X\}.$$
Im interested in the following question. When is this space $(\text{Iso}(X, d), D)$ a manifold (https://en.wikipedia.org/wiki/Manifold)? In particular, what are some conditions metric space $X$ can satisfy so we can conclude $\text{Iso}(X, d)$ is a manifold?
I was able to find this post Isometries of Riemannian manifold. Here it says that if $X$ is a Riemannian manifold than group of isometries is a Lie group which implies it is a manifold. Altough Im not sure that this implies space of isometries with metric $D$ defined above is a manifold.
Theorem. (Melleray) Let $G$ be a compact metrizable group, then there is a compact metric space $K$ such that $G$ is homeomorphic to $\text{Iso}(K)\subseteq K^K$ with product topology.
Reference: "Compact metrizable groups are isometry groups of compact metric spaces." by J. Melleray
Note that on $\text{Iso}(K)$ uniform and product topology coincide since its compact in uniform topology, see here. Indeed, the map $(\text{Iso}(K), \tau_u)\to (\text{Iso}(K), \tau_p)$ where $\tau_u$ is uniform topology and $\tau_p$ is product topology is a map from compact to Hausdorff space, so a homeomorphism, hence $\tau_u = \tau_p$.
In particular by taking $G = \{0, 1\}^{\aleph_0}$ to be the Cantor space with operation induced from $\mathbb{Z}/2\mathbb{Z}$, we obtain that group of isometries can be quite different from a manifold.
The Hilbert-Smith conjecture implies that if $K$ is a connected manifold, then $\text{Iso}(K)$ is a Lie group. See this post by Terence Tao. The conjecture is known for Riemannian manifolds, and for topological manifolds of dimensions $\leq 3$, so that when $K$ has one of those properties then $\text{Iso}(K)$ is a Lie group.