Elements gain or loss or share electrons to become stable. So, if element Z gains 3 electrons then it can be said that it has become more stable and since it has gained electrons therefore it has become negatively charged.
11
Huda answered this
when the element gets three electrons it will exceed the no. of protons and hence get negatively charged