Ionic bonding:

Ionic bonding occurs when atoms transfer electrons to achieve a full outer shell, typically between a metal and a non-metal.


This results in the formation of charged ions: metals lose electrons to become positively charged cations, while non-metals gain electrons to become negatively charged anions.