Religion is usually considered one of the function systems of society; it is one of ten described by Steffen Roth and Anton Schütz (2015) in “Ten Systems: Toward a Canon of Function Systems,” and Luhmann wrote a book (though he didn’t finish it himself) on the religion system. But as Roth, et al. (2017) show in show in “Futures of a distributed memory: A global brain wave measurement (1800-2000),” the religion system has declined in influence over the last two centuries.
Major global religions, including Roman Catholicism and the the various moderate Protestant denominations, moderate Islam, Judaism, Buddhism, and Hinduism, are carriers of tradition. They preserve cultural memories, in this way offering stability and a sense cultural identity. They also provide stability related to time by removing the uncertainty about, for example, what a Christian family is going to do every Sunday morning. Of for a Muslim who prays five times a day, fasts during Ramadan, etc., the uncertainty of what he or she is going to do five times a day and during Ramadan is removed. The same goes for an observant Jew on the Sabbath, during Hanukkah, and so on. Rituals, in general, reduce uncertainty by telling us what we should do in times of stress or transition, such as when a family member dies and we know we must have the body taken away and then prepare for some kind of funeral or memorial. Ritual tells us what’s next, or what’s we’re expected to do next. On a more superficial level, religion can provides a sense of community, including a network of friends, but the same ends might achieved by a book club or an adult softball league.
Fundamentalist religions, on the other hand seem to be protest movements, which is a separate type of social system (along with interaction systems, organizations, function systems, and society itself). These days, the religions that appear most prominently in the mass media (and whatever contemporary society knows about itself comes from the mass media) are conservative protest movements, often fundamentalist movements, which are protesting against contemporary secular society. The mass media doesn’t pay much attention to moderate religions because they usually newsworthy.