Associated to any associative algebra $A$ is the Hochschild cochain complex
\begin{align*}
HH^n(A) &= \operatorname{Hom}(A^{\otimes n},A),\\
\mathrm d f(a_0,\dots,a_n) &= a_0f(a_1,\dots,a_n) + (-1)^{n+1} f(a_0,\dots,a_{n-1})a_n + \sum_{i=1}^n (-1)^i f(a_0,\dots,a_{i-1}a_i,\dots,a_n)
\end{align*}
In particular, $\operatorname{ker} d^1\subset \operatorname{Hom}(A,A)$ are exactly the derivations, and $\operatorname{im} d^0\subset \operatorname{Hom}(A,A)$ are the inner derivations. Thus there is an exact sequence
$$
0\to Z(A)= HH^0(A)\to A\to \operatorname{Der}(A)\to HH^1(A)\to 0
$$
For $A = \operatorname{Sym}(V)$, we have $HH^i(A)\cong \operatorname{Hom}(\Lambda^i V,\operatorname{Sym}(V))$ (the Hochschild-Kostant-Rosenberg isomorphism). In this case this exact sequence encodes that a derivation is uniquely and arbitrarily defined by what it does on generators. This cochain complex carries an obvious commutative multiplication and a $1$-shifted Lie bracket which uniquely extends the commutator of derivations and their action on algebra elements as a biderivation.

For $A = U\mathfrak g$, the PBW filtration defines a filtration on the Hochschild complex, and the associated graded is $HH^*(\operatorname{Sym}(\mathfrak g))$. Thus you get a spectral sequence with $E^1$-page $\operatorname{Hom}(\Lambda^i \mathfrak g,\operatorname{Sym}(\mathfrak g))$, where the differential is given by taking the Lie bracket $[\Pi,-]$ with the element $\Pi\in\operatorname{Hom}(\Lambda^2\mathfrak g,\mathfrak g)$ defining the Lie structure (the fact that this squares to zero is equivalent to the Jacobi identity). In fact, this complex can be identified with the Chevalley-Eilenberg complex calculating the Lie algebra cohomology of $\mathfrak g$ with values in $\operatorname{Sym}(\mathfrak g)$. A quite deep theorem by Kontsevich implies that this spectral sequence degenerates at the $E^2$-page (compare Pevzner, Michaël, and Ch Torossian. "Isomorphisme de Duflo et la cohomologie tangentielle." Journal of geometry and Physics 51.4 (2004): 486-505.). This implies the following for the two groups we are interested in:

- $Z(U\mathfrak g) = HH^0(U\mathfrak g)\cong (\operatorname{Sym}\mathfrak g)^{\mathfrak g}$ (Duflo isomorphism)
- $HH^1(U\mathfrak g)\cong H^1(\mathfrak g,\operatorname{Sym}\mathfrak g)$ (recall that Lie derivations are given by $H^1(\mathfrak g,\mathfrak g)$)

Theoretically you can also identify the maps in the above exact sequence explicitly by chasing through the proof of the formality theorem.