Let $G$ be a connected liegroup. It holds $$Z(Lie(G))=Lie(Z(G)),$$ where $Lie(G)$ is the liealgebra of $G$ and $Z(\_)$ denotes the center of the group resp. the algebra.
I am searching for an counterexample, which demonstrates, that the precondition of beeing connected is necessary.
Take $G=O(2,\mathbf R)$, whose $1$ dimensional Lie algebra is commutative, and therefore equal to its center. The center of $G$ however is discrete, so it has $0$ dimensional Lie algebra.