If $G$ is a finite group, $H$ is a subgroup of $G$, and $H\cong Z(G)$, can we conclude that $H=Z(G) $?
I learnt that if two subgroups are isomorphic then it's not true that they act in the same way when this action is related to outside groups or elements. For example, if $H \cong K $ and both $H,K$ are normal of $G$ then it's not true that $G/H \cong G/K$. Also, there is sufficient condition (but not necessary, as I read after that) for there to be an automorphism that, when restricted to $H$, induces an isomorphism between $H$ and $K$.
Now, is this true in this case? or is the statement about center and its isomorphic subgroups always true?
No. Let me explain why. You should think of $H\cong K$ as a statement about the internal structure of the subgroups $H$ and $K$. The isomorphism shows only that elements of $H$ interact with each other in the same way that elements of $K$ interact with each other. It doesn't say how any of these elements behave with the rest of the group - that is, the external behavior of elements of $H$ with the rest of $G$ may not be the same as the external behavior of elements of $K$ with the rest of $G$.
Being the center of a group is a statement about external behavior. If we state that every element of $Z(G)$ commutes with every other element of $G$, then just because $H$ and $Z(G)$ have the same internal structure doesn't mean that every element of $H$ must then commute with every other element in $G$.
For an easy counterexample, consider $G=S_3\times \mathbb{Z}_2$. Let $\alpha$ be any of the transpositions $(12)$, $(13)$, or $(23)$ in $S_3$, and let $\beta$ be the generator of the $\mathbb{Z}_2$. Here, by virtue of the direct product, $\beta$ commutes with every other element of $G$, and it is not difficult to see that no other nontrivial element of $G$ holds this property, so $\langle\beta\rangle =Z(G)$. On the other hand, we know that all groups of order $2$ are isomorphic, so $\langle \alpha \rangle \cong \langle \beta \rangle$.