I've read some posts explaining how Europe was able to dominate the East, specifically China, but I get the impression that the colonization of Africa is almost taken for granted. Africa is a massive continent and also the most diverse, but when reading accounts it seems like Europeans carved it up like a Christmas ham and the main issue was who got what rather than how to subjugate the various lands.
As a sub question (let me know if this should be a separate post), I remember watching an Alternate History Hub video where they asked what would happen if the Americas didn't get colonized right away and they predicted that Europe would have colonized Africa anyway. I had always imagined that a big part of Europe's ability to colonize other areas had been bolstered by the massive amounts of raw material they extracted from the New World, is this impression wrong? I have been actively avoiding the channel because the idea seems preposterous to me that Europe would have been as dominant today if it hadn't been for a long chain of lucky incidences.
I'm going to focus on the first part of your question, and for simplicity I'm going to define "Africa" as "Sub-Saharan Africa, minus South Africa", or SSA. North Africa is geographically and culturally distinct from the rest of the continent, and South Africa is its own weird thing.
Okay, so: what's interesting about the European conquest of Africa is not so much that it was fast but that it was late. If you look at a map of Africa in 1860, the area of European control in SSA is tiny -- offshore islands plus a thin scrim along the coast. Almost nowhere does European authority extend more than a few miles inland. Furthermore, in 1860 there are still huge areas, millions of square km, that are terra incognito to Europeans. No European has reached the source of the Nile or climbed Kilimanjaro, the Congo Basin is a huge white space on the map, and so forth.
By the 1850s Europeans had steamships, artillery, rifles, telegraphs, steel tools, large nation-states that could deploy massive armies, widespread literacy, plus a host of useful secondary technologies from telescopes to canned food. And at that point Europeans had already conquered and/or colonized vast swathes of the planet, from Argentina to Siberia, California to India. Yet up until 1860 or so, Europeans had barely made a dent in conquering sub-Saharan Africa.
Why? Well, there are a lot of reasons, but the short answer is that it mostly wasn't worth it. Before 1860, what Europeans wanted from Africa was mostly trade goods -- gold, ivory, slaves, a handful of agricultural goods such as West African pepper. They could get this without conquest. And let's note that this relationship of "trade, but not much actual conquest" went on for a long, long time. The first serious western European contact with SSA took place in the 1440s. Not a typo -- 50 years before Columbus. This was the decade that Portuguese traders arrived in West Africa, while at the same time Ethiopian monks showed up at a Church council in Florence. The pattern of "establish bases, control the coast, trade, but don't actually conquer much" was established early, and then stayed pretty stable for over 400 years! This included the peak years of the slave trade, 1660-1820.
(This is a thing that people often get confused: the slave trade was horrible, and the colonization of Africa by Europeans was also horrible. But they were two completely different things. Actual conquest and colonization mostly took place after 1860, by which time the slave trade had mostly dried up. I'm simplifying but that's basically correct.)
So what changed after 1860? Well, one big change was that Europe got better at efficiently extracting wealth from colonies. For example, if you look at East Africa -- modern Kenya and Tanzania -- up until the 1860s, it's the usual retail-scale trade for ivory and a bit of coffee. Then suddenly you have British and Germans coming in and setting up plantations to grow stuff like cotton, coffee and tea. This starts with small farms along the coast but very quickly ramps up to industrial scale plantations extending for hundreds of kilometers inland. Obviously this requires a massive re-ordering of African society, which in turn requires conquest. But once the conquest was carried out, the returns were vastly greater.
(A complex side topic is whether the colonies really represented a net profit to the European colonizers. The current consensus is "yes, though not as much as the colonizers thought at the time". But there's been a lot of back-and-forth on this over the years and there's still a minority view that African colonies were actually a net money sink even if they looked great on the map and made a few people rich.)
(Another complex side topic is the influence of Africa's disease environment on European conquest. I won't go into detail except to say that it was definitely an issue -- one reason most of SSA never saw much European settlement was that European settlers tended to drop dead of tropical diseases. On the other hand, Europeans managed to conquer environments in Southeast Asia and Central America that were nearly as bad as SSA. So let's just note that it's an issue and leave it at that for now.)
Another thing that pulled Europeans into Africa was rivalry with other Europeans. This had always been an issue, but up until the Napoleonic period it was basically "The Portuguese founded this trading base. Then the Dutch captured it from the Portuguese, then the English took it from the Dutch. Then the French took it from the English, and then the English took it back". (Not an exaggeration -- there are several places in West Africa where that's exactly what happened.) But once inland expansion got going, it became a race. In many cases it was, literally, a race... some of the weird boundaries of modern African states exist because simply because one group of Europeans got there first. So, for instance, that weird bit in the middle of Zambia where the southern corner of the Congo pushes down and almost cuts Zambia in two? That exists because a Belgian expedition arrived a few weeks before the rival British expedition. More generally, European powers became increasingly aware of the importance of key economic resources -- coal, rubber, iron, tin, cotton -- and the perceived need to claim them before others did.
So starting around 1860 you have economic "pull" and European rivalry "push". Now as to the actual mechanics of conquest... well, before the 19th century, African military forces could and did defeat Europeans when Europeans tried to push inland from the coast. So, for instance, when the Portuguese made an attempt to expand their influence into what's now Zimbabwe in the 1680s, the local Africans were able to defeat them at the Battle of Maungwe in 1684. There were a lot of small battles like this that are mostly forgotten now, overshadowed by the rapid and complete European conquests after 1860.
Almost all of the conquest of Africa took place in a really short period of time between around 1860 and 1895. And this is a period when the military power differential between Europe and the rest of the world is just about at its maximum. As the poet Hillaire Belloc wrote, "Whatever happens, we have got / The Maxim Gun [early machine gun] -- and they have not." 19th century Africa didn't have a lot of highly organized states that could field and maintain large military forces; they didn't have indigenous production of rifles or other advanced weapons; they didn't have European experience with communications, logistics, or administration. They could win occasional battles, like the Zulus beating a small British force at Isandhlwana; they could very occasionally fight a war to a draw, like the War of the Golden Stool in Ashanti. But they couldn't actually win any wars against a determined European invader.
There's only one exception, and it's sort of an exception that proves the rule: in the Adowa Campaign of 1897, the strongest and best organized African state (Ethiopia) was just able to pull off an upset victory in a defensive war against the weakest, poorest, and least competent European colonial power (Italy).
Here's one way to think of it: the British conquest of India took about a century, from the First Carnatic War in the 1740s to the conquest of Sindh almost exactly 100 years later. Now, imagine if the British had left India mostly alone until 1860 and THEN set out to conquer it. In the 1760s they were attacking with sailing ships, muskets, and cannon. In the 1860s they would have been attacking with steamships, rifles, artillery and the telegraph. The Indian ability to respond would also have grown, but not by as much. So the conquest would have gone a lot faster, yes? Well, that's more or less what happened to Africa.