there are 4 electrons in the outermost shell and 6 protons in its nucleus.
if it forms more than 3 bonds with an atom, it will form an ionic bond and complete its octet.
but it cannot gain or lose electrons.
if it gains 4 electrons, it would be difficult for the nucleus with six protons to hold on to ten electrons, that is, four extra electrons.
if it loses 4 electrons, it would require a large amount of energy to remove 4 electrons leaving behind a carbon cation with six protons in its nucleus holding on to just 2 electrons.
carbon overcomes this problem by sharing its valence electrons with other atoms of carbon or with atoms of other elements.
hope it helps!!