I propose a solution of the case where potentially $m \gg n$.
Assume that $\mathbf A$ is positive semidefinite.
By eigendecomposition, $\mathbf A = \mathbf Q\mathbf S\mathbf Q^\top$ where $\mathbf Q$ is an orthonormal matrix of shape $n \times n$.
Consider another decomposition of $\mathbf A$ such that $\mathbf A = \mathbf P|\mathbf M|^2\mathbf P^\top$ where $|\mathbf M|^2$ is diagonal and $\mathbf P$ is an $n \times m$ matrix ($m > n$) defined as $\mathbf P \triangleq \mathbf Q\boldsymbol\Pi^\top$.
Thus, if $\mathbf X^\top \mathbf X = \mathbf A$, then $\mathbf X = |\mathbf M|\boldsymbol\Pi\mathbf Q^\top$.
Since $\mathbf Q$ is known given $\mathbf A$, we need only to find $|\mathbf M|$ and $\boldsymbol\Pi$.
$$
\mathbf Q\mathbf S\mathbf Q^\top
= \mathbf P|\mathbf M|^2\mathbf P^\top
= \mathbf Q\boldsymbol\Pi^\top|\mathbf M|^2\boldsymbol\Pi\mathbf Q^\top
$$
Naturally, our objective is to minimize $L(|\mathbf M|,\boldsymbol\Pi)=\|\boldsymbol\Pi^\top|\mathbf M|^2\boldsymbol\Pi-\mathbf S\|_F^2$, where $\|\cdot\|_F$ is the Frobenius norm.
We need also apply an orthogonal constraint $\boldsymbol\Pi^\top\boldsymbol\Pi=\mathbf I$ to ensure that the column space of $\mathbf P$ is necessarily isometric to that of $\mathbf Q$.
To apply orthogonal constraint in gradient method, see Section 1.1 Constraint-Preserving Update of this paper (too long to put it here).
The solution to such optimization could be nonunique (or must be nonunique?), but we may find a particular solution using coordinate gradient descent, namely first find a feasible $\boldsymbol\Pi_0$, fix $\boldsymbol\Pi_0$ and find a better $|\mathbf M_1|$, fix $|\mathbf M_1|$ and find a better $\boldsymbol\Pi_1$ subject to the constraint, fix $\boldsymbol\Pi_1$ and find a better $|\mathbf M_2|$, fix $|\mathbf M_2|$ and find a better $\boldsymbol\Pi_2$, etc. We may use one-step gradient descent (given a small learning rate) for each optimization step. To find the first feasible $\boldsymbol\Pi_0$, one may look into the doc of scipy.stats.ortho_group
.
For the implementation, we may resort to PyTorch, which does the gradient things for us.
For example, given
$$
\mathbf A =
\begin{pmatrix}
0.38672121 & -0.72476649\\
-0.72476649 & 2.58435428\\
\end{pmatrix}\,,
$$
here is what such algorithm gives for $m=10$:
$$
\mathbf X =
\begin{pmatrix}
3.02239738\times 10^{-1}& 8.15764615\times 10^{-2}\\
1.55106782\times 10^{-1}& 1.21846205\times 10^{-1}\\
4.31693560\times 10^{-2}&-3.22591722\times 10^{-1}\\
9.10323361\times 10^{-2}&-2.12030684\times 10^{-1}\\
-1.48292760\times 10^{-2}&-7.20156447\times 10^{-2}\\
-1.26908969\times 10^{-1}&-1.17936127\times 10^{-1}\\
1.47863458\times 10^{-1}&-2.93733723\times 10^{-1}\\
-5.72824350\times 10^{-2}&-6.42074711\times 10^{-2}\\
4.68723305\times 10^{-1}&-1.51760316\times 10^{+0}\\
-9.26707466\times 10^{-4}& 3.47160090\times 10^{-2}\\
\end{pmatrix}\,.
$$
One may verify that $\mathbf X^\top \mathbf X$ is numerically closed to $\mathbf A$.