The first human buildings were very much a matter of trial and error using whatever materials were available, people built shelters, and then other people copied the ones that worked. You might not realise it, but most of the world is still full of these kinds of buildings, especially outside urban areas in less developed countries.
Ancient cultures like the Egyptians and the Romans made home-building from oral traditions into written practices, and were able to formalise architecture to build incredibly complex buildings, like the pyramids and the Coliseum. They also built many more everyday buildings, such as universities, hospitals and the Roman baths. It was from this that architecture evolved through the centuries.
Twentieth-century architecture built on these centuries of building experience, but wanted to simplify and mass-produce buildings as technology got better and populations rapidly grew. This gave rise to modernist architecture, a very minimalist style where every unnecessary detail and adornment was removed, leaving only the building itself basically, a big box. These buildings can still be seen (and lived in) today, and are perfectly functional,...