2 deleted 8 characters in body

Yes. Let $J(\mathfrak{g}) := (Z(\mathfrak{g}) \cap \mathfrak{g} U( \mathfrak{g} ) ) \cdot U(\mathfrak{g})$ denote the ideal of $U(\mathfrak{g})$ you're interested in.

First note that if $\mathfrak{g}$ is the $2n + 1$ dimensional Heisenberg Lie algebra $\mathfrak{h}_n$ with basis vectors $x_1,\ldots, x_n, y_1,\ldots, y_n, z$ and the only non-zero Lie brackets $[x_1,y_1] = [x_2,y_2] = \cdots = [x_n,y_n] = z$, then it's not hard to calculate that $Z(\mathfrak{h}_n) = k[z]$ (since $k$ has characteristic zero), so that in this case we have $J(\mathfrak{h}_n) = zU(\mathfrak{h}_n)$ has infinite codimension in $U(\mathfrak{h}_n)$.

Now if $\varphi : \mathfrak{g} \twoheadrightarrow \mathfrak{h}$ is a quotient of $\mathfrak{g}$, then $\varphi(J(\mathfrak{g})) \subseteq J(\mathfrak{h})$.

Thus it suffices to show that every finite dimensional non-abelian nilpotent Lie algebra $\mathfrak{g}$ admits some $\mathfrak{h}_n$ as a quotient.

Since $\mathfrak{g}$ is non-abelian, by replacing $\mathfrak{g}$ by $\mathfrak{g} / [\mathfrak{g}, [\mathfrak{g},\mathfrak{g}]]$ if necessary, we may assume that $\mathfrak{g}$ has nilpotence class two. Therefore $0 \neq [\mathfrak{g}, \mathfrak{g}]\subseteq z(\mathfrak{g})$ (the centre of the Lie algebra $\mathfrak{g}$).

Pick some non-zero $z \in [\mathfrak{g}, \mathfrak{g}]$ and let $\mathfrak{a}$ be a vector space complement to $kz$ in $z(\mathfrak{g})$. By replacing $\mathfrak{g}$ by $\mathfrak{g} / \mathfrak{a}$, we may therefore assume that $[\mathfrak{g},\mathfrak{g}] = kz$. But now $[\bar{x},\bar{y}] = (x,y)z$ defines a non-trivial alternating bilinear form $(-,-)$ on $\mathfrak{g}/kz$. By the classification of such forms, we can find a quotient $\mathfrak{h}$ of $\mathfrak{g}$ such that $[\mathfrak{h}, \mathfrak{h}] = kz$, and moreover the corresponding bilinear form on $\mathfrak{h} / kz$ is non-degenerate. This $\mathfrak{h}$ is isomorphic to some $\mathfrak{h}_n$.

1

Yes. Let $J(\mathfrak{g}) := (Z(\mathfrak{g}) \cap \mathfrak{g} U( \mathfrak{g} ) ) \cdot U(\mathfrak{g})$ denote the ideal of $U(\mathfrak{g})$ you're interested in.

First note that if $\mathfrak{g}$ is the $2n + 1$ dimensional Heisenberg Lie algebra $\mathfrak{h}_n$ with basis vectors $x_1,\ldots, x_n, y_1,\ldots, y_n, z$ and the only non-zero Lie brackets $[x_1,y_1] = [x_2,y_2] = \cdots = [x_n,y_n] = z$, then it's not hard to calculate that $Z(\mathfrak{h}_n) = k[z]$ (since $k$ has characteristic zero), so that in this case we have $J(\mathfrak{h}_n) = zU(\mathfrak{h}_n)$ has infinite codimension in $U(\mathfrak{h}_n)$.

Now if $\varphi : \mathfrak{g} \twoheadrightarrow \mathfrak{h}$ is a quotient of $\mathfrak{g}$, then $\varphi(J(\mathfrak{g})) \subseteq J(\mathfrak{h})$.

Thus it suffices to show that every finite dimensional non-abelian nilpotent Lie algebra $\mathfrak{g}$ admits some $\mathfrak{h}_n$ as a quotient.

Since $\mathfrak{g}$ is non-abelian, by replacing $\mathfrak{g}$ by $\mathfrak{g} / [\mathfrak{g}, [\mathfrak{g},\mathfrak{g}]]$ if necessary, we may assume that $\mathfrak{g}$ has nilpotence class two. Therefore $0 \neq [\mathfrak{g}, \mathfrak{g}]\subseteq z(\mathfrak{g})$ (the centre of the Lie algebra $\mathfrak{g}$).

Pick some non-zero $z \in [\mathfrak{g}, \mathfrak{g}]$ and let $\mathfrak{a}$ be a vector space complement to $kz$ in $z(\mathfrak{g})$. By replacing $\mathfrak{g}$ by $\mathfrak{g} / \mathfrak{a}$, we may therefore assume that $[\mathfrak{g},\mathfrak{g}] = kz$. But now $[\bar{x},\bar{y}] = (x,y)z$ defines a non-trivial alternating bilinear form $(-,-)$ on $\mathfrak{g}/kz$. By the classification of such forms, we can find a quotient $\mathfrak{h}$ of $\mathfrak{g}$ such that $[\mathfrak{h}, \mathfrak{h}] = kz$, and moreover the corresponding bilinear form on $\mathfrak{h} / kz$ is non-degenerate. This $\mathfrak{h}$ is isomorphic to some $\mathfrak{h}_n$.