In many ways it comes down to two national essentials: land and people.
Nigeria is roughly 1/6th the size of the USA but has almost 2/3 the population. That means the nation is crowded into cities and even small hamlets are not far from others.
South Africa is a bit larger than Nigeria but has less than a third of its population (56 million South Africans compared to nearly 200 million Nigerians).
On the other hand much of Nigeria is perfect for farming, with sahel and savanna being limited to the north of the nation, while much of South Africa is scrub or desert, with more limited areas for farming (admittedly SA has some wonderful wine country, and boasts excellent agriculture and game in parts).
Nigeria has a tropical wet/dry climate while South Africa has a Mediterranean climate on the coast (hence that excellent Pinotage they produce, along with other varietals) and a drier, more temperate climate inland (SA gets snow, Nigeria does not).
Nigeria’s many peoples speak between 300 to 500 languages and dialects, depending on how one classifies these many tongues, while SA has but 11 official languages.
South Africa has Christians, fewer Muslims and more admitted traditionalists than Nigeria, which is evenly divided between its Muslim north and Christian south. Religion plays a much more pronounced role in the lives of Nigerians as well, although both have their share of corrupt pastors. Indeed there are numerous churches with shared congregations among both nations.
Both nations struggle with corruption, but SA has a better chance of overcoming this scourge due to the divisions between its ethnic groups, which help balance power and provide counterweights to each other. While Nigeria’s many tribes divide its peoples, all Nigeria tribes have the similar tendency to favor their own over everyone else: corruption follows each tribe in turn as its leaders come to power. Corruption in South Africa balances between indigenous tribes such as the Zulu and Xhosa, but also among the coloreds, the Boers, and others. This means any one group had to take into account diverse conflicting needs and desires or risk the out groups uniting to overthrow the leadership, while in Nigeria corruption merely cycles between the north and south.
Nigeria does have a more successful recent democratic series of transitions, and has endured far more military rule than SA, which has remained under one party rule since the end of Apartheid decades ago.
SA is also far more developed than Nigeria. It’s principal cities offer European standards of living for middle class and
wealthy citizens, while in Nigeria even the president flys to the UK for medical treatment. One can drive thousands of miles around SA’s well paved roads unaccompanied by guards or stopped by security checkpoints every hour or so, while the security situation in Nigeria remains difficult and infrastructure more poorly maintained or absent.
Interestingly I’ve found in spite of greater difficulties Nigerians are more optimistic, more entrepreneurial, and more willing to do whatever it takes, while South Africans seem more resigned and accepting of their situation. That last is more of a personal impression though and much more anecdotal than the other observations.
Both are great nations and their respective influences are felt far beyond their own borders on the continent