Insects

Some insects have adapted to living alone while others form huge communities, often hierarchical.

An excerpt from the article 17 facts about insects
The most common solitary insects are dragonflies, less commonly beetles. Insects that live in groups include bees, wasps, termites, and ants.