A billion years before the first multi-celled life, microbes and bacteria learned to cooperate on a large scale. Biofilms protect colonies of bacteria and help them to explore their environment more efficiently, seeking resources. Signals like nerve impulses help coordinate the bacteria’s collective behavior.
The most dramatic example is the way amoebas live and compete as independent cells until the colony is threatened. Then they pull together to form a “fruiting body”. The great majority of cells sacrifice their legacy so that a few at the head can form spores that survive into the future.