The main reason that Ghana grew rich was: They taxed traders who passed through the empire.
While the other options may have contributed to its wealth in various ways, the taxation of trade was a significant and direct source of revenue for the Ghana Empire.