Mansa Musa wasn't even that rich. In reality the amount of gold he had is unknown and is pretty much just based on a few historical accounts, most notable is of some arab guy called (Ibn Fadlallah) Al-Umari, more than a decade later after his Hajj took place. That guy asked random people from the egypt (where was mansa musa) about how much the Mansa broght gold and camels, and they obviously gave some vague numbers like "a lot" and "thousands", because that was a long time ago. this gold likely came from years of gathering in his homeland Mali. So when modern historians convert this amount of gold in dollars, they get massive number in billions, which leads to the web articles that goes like "The richest man in the history?". and the claim that he apparently crashed the economy of egypt because he gave out gold to normal people is straight up a hoax of al umari in his book "Masalik Al-Absar Fi mamalik Al amsar" (this is the same book that is full of psuedoscience). As the accounts of that time in egypt (1320's and 30's) clearly shows that there was no a major decrease in price of a gold (picrel, from the book of Early muslim world historian Warren C. Schultz in his book "Mansa Musa's Gold in Mamluk Cairo: A reappraisal of A World Civilizations Anecdote). And then when his hajj ended, he literally went backrupt (kek). I simplified it in picture 2. So yeah, he was basically a fraud. Also see this Youtube video, he explained it more well:
https://www.youtube.com/watch?v=-nzafFycvJc