To put it simply; repeated decimating invasions and loss of trade.
Now to go into detail.
1258 is the year most historians consider to either be the end of the Islamic Golden Age or at least the marker for the beginning of the end.
For decades proceeding this the Middle East had been under pressure by various crusading forces from Europe. These incursions were more of an annoyance than existential threats though.
However what came from the east in 1219...
In 1218 Genghis Khan was completing the smiting of Jin China. The Jin would not be completely defeated until several years after his death, but at this point he had done irreparable economic damage to them, annihilated their capital, and taken a huge swath of their territory. Jin China was a dying fire.
With the hardest part of the conquest out of the way, Genghis Khan was able to turn his attention to other things. Like dealing with ankle biters rebelling in the north, and settling an old score in the west.
The son of an enemy he had beaten long before named Kuchlug had escaped to a region of western Asia called the Kara-Khitan Khanate. When he arrived he wormed his way into becoming an adviser to the court, and then proceeded to rebel and take over the country.
Early in his rule he converted from Nestorian Christianity to Buddhism on behalf of his Buddhist wife. Then he became a religiously intolerant dick. Numerous anti-Islamic policies were put into law and he even crucified at least one Imam. He also tried to take over territory that was in the geopolitical grey areas between his kingdom and the various Chinese empires. The cities in these areas actually reached out to Genghis Khan and asked for help.
Genghis Khan was very happily obliged to do so.
He went in with any army, kicked Kuchlug's ass, and Kuchlug then retreated deep into his kingdom only to find no one wanted to help him because of the previously mentioned religious policies he instituted. He would eventually be caught and killed. Genghis Khan then peacefully (by his standards at least) incorporated the Kara-Khitan Khanate into his empire and instituted his policy of total religious freedom. Because of this whole affair he was given the title "Defender of Religions".
So with that out of the way and with the campaign in China going well, Genghis had time to do some actual governing.
In 1218 he sends a HUGE 500 person trade caravan (imagine the contents of a mall being transported by horse and cart) to the Khwarazmian Empire (which covered what is modern day Iran and a little more) which his own empire now shared a border with. He wanted to establish friendly relations, but he got the opposite...
The governor of the city in which the caravan arrived immediately seized the goods and imprisoned the people who had accompanied the caravan under a charge of spying.
Now it is possible the Khan did have an agent or two in this caravan who's job it was to snoop around and find things out about the place, but it would likely have been only to alleviate any concerns he might have about potential issues in political relations, not to plan an offensive invasion. There is zero evidence that he had plans to push further west at this time.
Genghis Khan not wanting conflict is even more supported by the fact he sent three ambassadors to the Khwarezmian Shah after being informed about the incident.
The Shah was paranoid though. Stories and reports from China had made their way to him over the last several years about the Mongols and he did not trust them. This point of view makes sense if you step into his shoes, but of course we have the gift of hindsight.
He received the ambassadors and listened to their list of Genghis Khans demands. It was extremely simple; hand over the city governor that had committed the offense so that he could be punished, release the caravan workers, and return the stolen goods. If this was done then the incident would be completely forgiven.
After hearing the demands the Shah had two of the ambassadors heads shaved and had the third one beheaded. The two shaved ones were then sent back to Genghis Khan with the head.
Now if you read much about Genghis Khan you will know that the easiest way to piss him off and incur his wrath is to kill his emissaries. It happened like half a dozen times to; people never learned. The only way to piss him off even more was kidnap and rape his wife... which the Merkits did when he was 19. In response to that he spent the next 20 years beating their ethnic group into extinction.
Anywaaaaays....
The Shah likely thought that war with the Mongols was inevitable and that he might as well throw down the gauntlet sooner rather than later while the Mongolian military was tied up with China. Unfortunately for him and soon most of the Muslim world, the Mongols were not as preoccupied previously thought.
Only a few months later Genghis Khan rolled in with an army 100-150,000 strong and composed not only of cavalry, but also Chinese siege engineers who likely brought gunpowder weapons, as well as a decent number of infantry units from various parts of the Mongolian Empire. It was the most diverse force Genghis had ever assembled yet he wielded it like a conductor would a baton. The invasion came from multiple different directions; some elements attacked from different parts of the border simultaneously and some were staggered. Before the actual invasion, Genghis had sent in his advanced intelligence network and collected as much information about the empire's various weaknesses and strengths as possible. Each separate military force was given a specific objective. Some were to destroy farmland and agrarian infrastructure, some to take cities, one to pursue fleeing nobility, etc...
He wasn't waging war like a classical or medieval general would. He was waging war like a a general in the 19th or even 20th century would.
The Khwarazmians were not prepared his this level of warfare. No one at the time was. The advanced military strategies and tactics the Mongols used during this period were one of the biggest reasons for their overwhelming success. No had ever waged war like this at the scale the Mongols currently were. The Romans were certainly on the Mongols level in terms of logistics and tactics, but did not and could not campaign at anywhere near the same speed. No nations military would fully outclass the one the Mongols had under Genghis Khan and his sons until well into the industrial age.
In just two years the Khwarazmian Empire was crushed. Utterly and completely crushed in a way that few have been since. In those two years Persia suffered critical levels of depopulation. 14,000,000 people are estimated to have died by a combination of Mongol hands and the famine they intentionally caused across the region.
At this point Genghis essentially went "fuck it" and allegedly labelled himself the wrath/flail of God, and claimed that him and his brood were destined to conquer the world.
At this time the Caliph was still around, and the Mongols could not stand to be in such proximity to a sovereign claiming complete divine right to independent rule.
And so for roughly the next half a century the Middle East was under siege by an enemy that claimed unmitigated right to dominate it, and brutally fought any and all resistance to that decree. Tens of millions died during the conflict. The irrigation infrastructure that had made many areas in the Middle East arable were torn apart, and much of this land still has not recovered. The greatest libraries in the Middle East were burned, higher education across much of the region went into steep decline, culture stagnated or regressed in many ways, and in 1258 Baghdad was seized and the Caliph was rolled up in a carpet and trampled to death. For several decades afterwards the once shining pinnacle of Islam was a burned out shell and tomb to hundreds of thousands killed in the aftermath of the siege.
In the years following that blow the Mongolian Empire halted its expansion. It broke apart into a multitude of different empires and kingdoms because of drama between Genghis's descendants, and due to its sheer size. At it's peak the Mongolian Empire covered almost 13,000,000 square miles (only slightly smaller than the British Empire) and to this day is still the largest contiguous empire in the history of mankind. It actually ruled over a larger percentage of the human population at the time of its existence than the British Empire did. For a short time 1 out of every 4 people on Earth lived under Mongol rule.
Today it might be possible for such a titanic entity to exist, but back then it was unsustainable.
The Middle East was able to recover somewhat for about a century after this, but then Timur came... a Genghis Khan wannabee who was distantly related the man himself (as are millions of other people) and he did a huge amount of damage during his tenure.
Later on and to the far west, Christian Spain pushed the Moors out of the Iberian Peninsula after almost 800 years of off and on conflicts. Almost immediately after this the discovery of the New World happened and the nations of Europe rushed to exploit its natural wealth. Within the next century the "world economy", which had existed in similar forms for thousands of years, was completely turned on its head. Sea routs to Asia made overland trade between Europe and Asia seem slow and expensive by comparison and the Middle East suffered a massive economic blow as a consequence. Due to the geographical location of the ME, the vast majority of the Muslim world was not able to take any direct advantage of the New World either.
The Muslim world did have a resurgence with the expansion of the Ottoman Empire but it never came close to reclaiming the military, economic, and academic dominance it had enjoyed during the height of its true golden age centuries earlier.
I hope that answers your question OP.