Given a finite dimensional, complex, semisimple (fcss) Lie algebra $\mathfrak{g}$ and an element $x\in\mathfrak{g}$, denote by $\mathfrak{g}^x$ the centralizer of $x$ in $\mathfrak{g}$ i.e. the set $\{y\in\mathfrak{g}\mid[x,y]=0\}$.
Consider a Lie algebra $\mathfrak{h}$, is there a fcss Lie algebra $\mathfrak{g}$ and an element $x\in\mathfrak{g}$ such that $\mathfrak{h}\cong\mathfrak{g}^x$? If it is the case, is there a way to give an explicit construction?
Partial answer:
In the case where $\mathfrak{h}$ is abelian, $\mathfrak{h}$ can be viewed as a cartan subalgebra of $\mathfrak{sl}_{\dim\mathfrak{h}+1}(\mathbb{C})$, take $h\in\mathfrak{h}$ regular (meaning its centralizer has minimal dimension) it is well-known that $\mathfrak{sl}_{\dim\mathfrak{h}+1}(\mathbb{C})^h=\mathfrak{h}$ so the answer is yes.
In the case where $\mathfrak{h}$ is reductive, decompose $\mathfrak{h}$ as $\mathfrak{s}\oplus\mathfrak{a}$ with $\mathfrak{s}$ semisimple and $\mathfrak{a}$ abelian. Let $\mathfrak{s}'$ be the semisimple Lie algebra and $h\in\mathfrak{s}'$ given by the previous construction for $\mathfrak{h}=\mathfrak{a}$ and set $\mathfrak{g}=\mathfrak{s}\oplus\mathfrak{s}'$ with $[\mathfrak{s},\mathfrak{s}']=0$. It is semisimple and $\mathfrak{h}=\mathfrak{g}^h$.
Edit:
Given $\mathfrak{h}$, the question can be answer looking at a finite number of Lie algebra $\mathfrak{g}$ and element $x$.
For $\mathfrak{g}$ a fscc Lie algebra. Let $f$ be an element of $\mathfrak{g}^*$, we denote by $\mathfrak{g}^{(f)}$ the stabilzer of $f$ for the coadjoint representation. The index of the Lie algebra $\mathfrak{g}$ is the minimal dimension of stabilizer $\mathfrak{g}^{(f)}$, $f\in\mathfrak{g}^*$.
If $\mathfrak{g}$ and $x$ satisfying the condition exist, as @Lspice mentionned, one can shift the study to centralizers of nilpotents element in reductive Lie algebra : if $x=x_s+x_n$ is the Jordan decomposition of $x$, we have that $\mathfrak{h}\cong(\mathfrak{g}^{x_s})^{x_n}$ and we know that $\mathfrak{g}^{x_s}$ is reductive.
By Vinberg's inequality (see 40.3.2 in [1]), the the rank of $\mathcal{g}$ has to be less than the index of $\mathfrak{g}^{x_s}$ which is in turn has to be less than the index of $\mathfrak{h}$. Up to isomorphism, there is a finite number of reductive Lie algebras of a given index. In such Lie algebras, there is a finite number of nilpotent orbits.
One can do even better as Vinberg's inequality is an equality in the case of reductive Lie algebra, the result is sometimes called Elashvili conjecture on indexes (see [2]).
[1]: Tauvel, P., & Yu, R. W. T. (2005). Lie Algebras and Algebraic Groups. In Springer Monographs in Mathematics. Springer Berlin Heidelberg. doi.org/10.1007/b139060
[2]:Jean-Yves Charbonnel, Anne Moreau, The index of centralizers of elements of reductive Lie algebras. Doc. Math. 15 (2010), pp. 387–421. doi.org/10.4171/DM/301