Invariants in the symmetric algebra of a module

The question subsumes all of 19th Century invariant theory, so I don't think there is much chance of a really explicit answer.

For example, take $\mathfrak{g} = \mathfrak{sl}_d(\mathbb{C})$ and let $V$ be the $\mathfrak{sl}_d(\mathbb{C})$-module obtained from the polynomial representation $\nabla^\lambda(\mathbb{C}^d)$ of $\mathrm{GL}_d(\mathbb{C})$ canonically labelled by the partition $\lambda$ of $n$ with at most $n-1$ parts. (So $\lambda$ is a dominant integral weight.) The invariants for $\mathfrak{sl}_d(\mathbb{C})$ in the degree $r$ component of $S(V)$ lift to elements of $\mathrm{Sym}^r \nabla^\lambda(\mathbb{C}^d)$ on which $\mathrm{GL}_d(\mathbb{C})$ acts as a power of the determinant: since det has polynomial degree $d$, the relevant power is $m = r|\lambda|/d$. These elements span a subspace of $\mathrm{Sym}^r \nabla^\lambda(\mathbb{C}^d)$ isomorphic to $\nabla^{(m^d)}(\mathbb{C}^d)$. Thus finding the dimension of the invariant spaces (as $d$ varies) is equivalent to finding the multiplicities of polynomial representations labelled by rectangular partitions in $\mathrm{Sym}^r \nabla^\lambda(\mathbb{C}^d)$.

This can be restated in the language of Schur functions as asking for $\langle s_{(r)} \circ s_\lambda, s_{(m^d)} \rangle$, where $\circ$ is the plethystic product. Decomposing plethysms into Schur functions is a notorious open problem in algebraic combinatorics. As far as I know, it is not made easier by restricting to constituents labelled by rectangular partitions.

This paper https://arxiv.org/pdf/0807.0430.pdf has a formula for the dimensions in the special case when $\lambda = (n)$ has one part, i.e. it finds the dimension of the invariant spaces of $\mathfrak{sl}_d(\mathbb{C})$ on the space $\mathrm{Sym}^n \mathbb{C}^d$ of $n$-ary forms in $d$ variables. The formula looks somewhat intractable to me.

For $\mathfrak{sl}_2(\mathbb{C})$ the simple modules are the symmetric powers of the natural module $E \cong \mathbb{C}^2$ and much more is known. Thinking of $\mathrm{Sym}^2 E$ as the space of quadratic forms, the invariant algebra $S(\mathrm{Sym}^2 E)^{\mathfrak{sl}_2(\mathbb{C})}$ is generated by the discriminant in degree $2$. Hence for $\mathrm{Sym}^2 E$ there is a unique invariant (up to scalars) in each even degree.

Still for $\mathfrak{sl}_2(\mathbb{C})$, but for all $r$ and $\ell$, the dimension of the degree $r$ component of $S(\mathrm{Sym}^\ell \!E)^{\mathfrak{sl}_2(\mathbb{C})}$ is the number of partitions of $\ell r/2$ that fit in an $\ell \times r$ box, minus the number of partitions of $\ell r/2-1$ in the same box. This is the Cayley–Sylvester formula: see e.g. Lecture XVII in Hilbert Theory of algebraic invariants. The dimensions are easily computed but do not grow in a regular way when $r \ge 3$. The symmetry swapping $r$ and $\ell$ is known as Hermite reciprocity. There is some more recent work on generalizations of the Cayley–Sylvester formula, see e.g. papers by King, Manivel and (please excuse the self-publicity) Paget and Wildon.