They were in front of the europeans they could have easily taken notes from them ?
This requires a lot of unpacking to be answerable.
First, European colonialism in sub-Saharan Africa did not happen in a single moment. If you take a sufficiently long perspective, many states in sub-Saharan Africa were successful in resisting European military and economic domination.
Think about it in a comparative sense: if you adopt a five or six century long framework, you could similarly ask, "why wasn't France able to counter English rule", or "why wasn't Greece able to counter Ottoman power"? Some of these kinds of questions don't look the same if you adopt a completely contemporary perspective.
If you are thinking in this longer historical frame, societies in the Zambezi Valley (contemporary Mozambique and Zimbabwe) and in Angola and present-day coastal Democratic Republic of Congo were able for a very considerable time to successfully constrain Portuguese military authority for centuries. European slave-trading powers in West Africa had no real military power or direct political authority over anything but small coastal trading forts for centuries. Powerful states in Ethiopia were able to defeat or turn back European military and economic intrusions into the 20th Century.
Even in cases where African states were defeated by European imperial power, that often took a century-long process of military conquest from the early 19th Century into the early 20th Century, and the degree to which the successful imperial conqueror was able to hold actual administrative authority in their new possession was frequently limited and contested. Keep in mind too that European imperial administration in much of sub-Saharan Africa lasted for only sixty to seventy years, which is really not very long in terms of global history, even in modern terms.