So in the cold war, the soviets kinda tried to get their influences through communism to spread all over the world, from asia (mainly vietnam and china) to south-america (mainly cuba). My question is, did or did they not try to do this in africa, and if yes, why, and if not, why not.
I hope my question is clear and understandable, if anyone has a followup question or if something is unclear, please leave a comment, i'll try to answer it
Yes. The Soviets supported a number of communist states in Africa. These included but was not limited to.
Ethiopia from 1974-1991 under the governments of the Derg and PDRE, it should be noted that both countries included modern Eritrea. This included along side Cuba supporting the Ethiopians in the 1977-1987 Ogaden War against Somalia and Somali insurgents in Ethiopian territory.
Angola in they supported the MPLA against the Portugese in the Angolian war of independance. It continued to support them into the proceeding Angolian civil war although unlike Cuba it did not deploy a significant number of troops.
It supported the communists in Benin from the military coup of 1972 till 1990 when it became a multiparty democracy.
Simlar to Angola they supported the FRELIMO in their ten year war of independance from Portugal starting in 1964. The FRELIMO established a communist state but had to fight a civil war lasting until 1992 with the soviets supporting them until the 1990 economic reforms that moderated the economic policy of the nation although the party remains in power until this day.
They also supported the people's republic of congo from 1969-1991. The Congolese Party of Labour remains in power till this day however it is no longer a single party state and their economic policy's are more moderate.
In Namibia they supported the SWAPO in their war against South Africa from 1966-1990. Officially Namibia is a multi party democracy with the SWAPO remaining the ruling party to this day and again with more moderate socialist economic policies from the 90s onwards.
In Zimbabwe they supported the Zimbabwe African People's Union in the Rhodesian Bush War. During a civil conflict after Zimbabwe emerged as victorious over the Rhodesians the ZAPU was officially absorbed into the Chinese supported ZANU.
The Soviets had active involvement across the continent. The most common trend we see is support of independence-minded rebel groups, but on occasion the Soviets had more extensive involvement in propping up friendly regimes and helping defeat rebels. Soviet support at face value often appeared to be ideologically driven, as Soviet clients in Africa generally took on leftist ideals, but the ease at which many of these clients dropped leftist politics during and after the Cold War once it no longer suited them gives the impression that ideology was a convenient facade for strategic motivations more than anything else.
A good case study is the Horn of Africa. Following Siad Barre's coup in 1969, Somali was declared a Marxist-Leninist Democratic Republic with the intention of attracting Soviet support. The Soviets were eager to capitalize on this - Somalia's location at the Horn of Africa was strategically important, as it provided access (and potential control over) shipping lanes through the Red Sea as well as access into the Indian Ocean. Somalia's proximity to US-aligned Ethiopia and the American SIGINT post at Kagnew Station in Eritrea also was of great importance. Initial support for Somalia began soon after Barre's regime took power, but Soviet involvement escalated after 1972, when Egypt expelled the Soviets and pivoted to the Western bloc. The Soviets signed a treaty of friendship with the Somalis, providing them with large amounts of modern military equipment and training in return for being allowed to create a naval base at the coastal city of Berbera. This allowed the Soviets to project power into the Indian Ocean, which would become a major point of contention and serve as a stepping stone towards the breakdown of the US-Soviet detente.
By the mid-70's, the situation in the Horn of Africa was rapidly changing. The imperial regime of Haile Selaissie in Ethiopia was experiencing a situation similar to that of Iran, and in 1974 this culminated in a left-wing coup. The politics of the Derg regime that would come into power in Ethiopia and the atrocities it would commit as it solidified power would come to alienate the US, ultimately causing the US to withdraw support for Ethiopia. Like Somalia, the Derg responded by pivoting to the East to get Soviet support. The Soviets were fairly enthusiastic about supporting the Derg, and, with Castro's Cuba getting involved, active diplomatic efforts were made to resolve long-standing disputes between Ethiopia and Somalia over Ethiopia's possession of the Somali-majority Ogaden region. Castro took this to the extreme, going as far as pursuing the creation of an Ethiopian-Somali federation to combine the two leftist states.
Unfortunately for all involved, Siad Barre's regime in Somalia had other ideas. Barre had been actively sponsoring terrorist groups in Ogaden with materiel he had received from the Soviets, and very much had the intention of causing Ogaden to break away from Ethiopia and join Somalia. As the Ethiopian Red Terror took hold and Ethiopia's military, economic, and political situation deteriorated, Barre took advantage of the chaos and invaded Ethiopia without warning in 1977. The Soviets and Cubans, not wanting to have two strategically important allies at war with eachother, attempted to mediate. When these efforts were ignored, they put pressure on Barre to withdraw by cutting back on aid and eventually cutting military supplied entirely. The Somali offensive would ultimately grind to a halt short of its objectives owing to fierce Ethiopian resistance. With supplies running short, Siad Barre made a desperate move and made the decision to eject the Soviets from Somalia practically overnight in hopes of attracting US support.
This would backfire massively for Somalia. The Soviets, understandably unhappy that the naval base they had just completed was no more, threw their full weight behind Ethiopia. They launched the largest airlift effort they had performed since WW2, shipped hundreds of tanks and armored vehicles in via Massawa, flew in 50,000 Cubans, diverted arms shipments from other Soviet allies to Ethiopia, and even went as far as diverting a satellite launch to provide timely intelligence. On the other end of things, Siad Barre found the Carter Administration was even less enthusiastic than the Soviets about supporting a dictatorial regime that had just invaded a neighbor with no warning or declaration of war. Nominal support was provided by the US, but no arms shipments were forthcoming. Some materiel support was provided by other anti-Soviet powers, including the People's Republic of China, Yugoslavia, and several anti-Soviet Arab states, but it was neither as timely nor numerous as the Somalis needed.
The end result was a spectacular defeat on the part of the Somalis. A reinvigorated Ethiopian Army backed by Cubans shattered the Somali Army and nearly annihilated it, destabilizing Siad Barre's regime and eliminating it as a serious threat. The Soviet presence in Ethiopia continued to the end of the Cold War, although they would become increasingly reluctant to back Ethiopia as Soviet and Ethiopian fortunes changed for the worse. The defeat of Somalia did not spell the end for the various leftist rebel groups across Ethiopia, and despite receiving similar levels of support from the USSR and Cuba as Angola, Ethiopia fared far worse against its rebels. The Ethiopian regime became increasingly incapable of fighting rebels despite massive amounts of Soviet support, while Ethiopia never gained the importance Somalia enjoyed, as Soviet naval forces had shifted to Aden in Soviet-aligned South Yemen.
Angola and the Congo had similarly extensive Soviet involvement as well, although I'm not as familiar with the strategic circumstances of Soviet involvement there.