In the Middle East Islam became markedly more reactionary and narrowminded in the 18th century and AFAIK the reason exactly why this happened is not clear.
As I pointed out earlier, such tendencies generally happen in populations who feel they aren't getting their fair shake. The War of the Holy League at the end of the 17th century marks the start of a long period of decline for the Islamic world.
That's a factor, but too simplistic and too Eurocentric/Mediterranean. Decline of a Turkish great power doesn't explain religious changes among Arabs and Persians. Many living outside the Ottoman Empire.
And yet they too suffered a decline which dates from around that period. The Ottoman decline is merely the most notable example of Islamic decline. It is far from the only one.