Africa was probably the place where people first built any kind of building, because people lived in Africa before they lived anywhere else. But those early huts didn’t last. The first buildings we know about are from Egypt: small stone tombs known as mastabas, built about 3000 BC. Egypt was first, because Egypt was the richest part of Africa, where trade with West Asia was easiest. By 2000 BC, people, maybe migrants from Spain and Italy, were also building stone tombs all across North Africa.
By that time, the Egyptians had moved on to building pyramids. The Egyptians started building the Pyramids about 2600 BC, when the Pharaohs first became rich enough to feed the huge numbers of people who must have worked to move all that stone. Nobody knew how to build walls and columns that would hold up a heavy roof yet, so the Pyramids are solid stone: that’s the easiest way to build something big.
A thousand years later, trade and wealth were spreading further south. African kings and queens in Nubia (modern Sudan) built mud-brick palaces at Kerma. They couldn’t afford to build in stone yet, but they could build in mud-brick. The buildings at Kerma have many rooms, and show their designers experimenting with circular buildings and rounded apses.
By about 2000 BC, architects in Egypt learned how to build temples using columns. At first they built temples of wood, with tree trunks for columns. Later they figured out how to make imitation tree trunks out of stone. Even the stone temples temples generally had wooden roofs, so that the roof would be lighter and the columns could hold it up. These were more expensive than mud-brick, but much cheaper to build than pyramids, because you didn’t need so much stone. Egyptian pharaohs built many temples and palaces during the New Kingdom, around 1500 to 1200 BC.
People in other parts of Africa were building houses and temples too, but they couldn’t afford the workers to build in stone. They built out of mud or wood, and their buildings haven’t lasted.