I'm not surprised African countries failed after independence. Things were not set up for success at independence.
POLITICAL PROBLEMS
1. Many African countries were ruled via traditional authorities (indirect rule) for most of the colonial era and representative democracy didn't become the norm till about a decade before independence.
This led to the subversion of traditional institutions (making them lapdogs to the modern state, both colonial and post colonial) while having nascent democratic institutions that weren't yet mature enough for independent rule.
This broke political continuity from the past, as traditional political institutions were transformed into social institutions while the newly formed political institutions hadn't been tested long enough to be certain of viability.
2. Most African countries, if not all, had a barely educated and poorly educated elite class. Very few university graduates, and most of them in the arts and humanities, rather than in STEM or business.
The new elites in most cases did not have the organizational capabilities or human capital of the colonizers they replaced. In many cases they did not even have the common sense of the colonizers.
3. Most African countries were incoherent. They were nations only on the map, but lacked the kind of linguistic, ethnic, religious and cultural coherence required for nationhood.
This meant that the democratic institutions that were still in their infancy were dealing with levels of complexity that their European colonial masters did not deal with in their own countries.
Inter ethnic squabbling became the main feature of politics in most African countries.
4. Most African countries had government control over the capital cities and a few other cities but largely ignored rural areas. The government only had effective control in the cities.
Thus, despite having a minority of the population in urban areas, those urban centers had a disproportionate political influence.
The ethnic incoherence and the disproportionate urban influence often meant that the political elites were alienated from the majority of their population since they did not possess the same ethnic or social background as their population. Their policies often reflected this alienation.
ECONOMIC PROBLEMS
5. African countries had a very rudimentary and unsophisticated economy at independence, with economic output limited to low value products.
6. Independence era governments inherited colonial economies in the sense that the entire economies of countries were designed to fit into an empire's economy as a source of a specific raw material and nothing else. Local needs were secondary to the need to export that single product. Infrastructure was geared towards that goal rather than meeting local needs.
7. African countries were usually mono economies with the bulk of exports being from one product: A natural resource like gold or diamond, or a crop like cocoa. Economies grew and died based on the price of that one product on the global market.
8. Often the rural agricultural population whose economic activities was the major component of the country's economy subsidized the urban population. The gains from their enterprise was nationalized while the benefits went to building more schools and providing more unnecessary government jobs in cities.
9. Industries that required technical skill were still in European hands at independence. Many African countries simply transferred control to less competent hands with nationalization policies.
SUMMARY
The demographic composition of the countries and the radical political changes that took place over a short period meant that African countries were much more politically complex than European countries while having much weaker and untested political institutions and infrastructure.
The economies of most countries were colonial economies and there was no local knowhow to transform them into national economies.