I would define religion in a polythetic, Wittgensteinian, family-resemblance kind of way. Let me unpack that a little…
There are several ways to define things: there’s the “essentialist” way that specifies the characteristics that are both necessary and sufficient. For example, bachelors are unmarried men. All unmarried men are bachelors, and all bachelors are unmarried men. Being a man and being unmarried are necessary and sufficient conditions for defining a bachelor. This type of definition doesn’t work well for religion, I don’t think.
Another type is polythetic definitions, which define things based on the ways that they are similar to each other. These definitions rely on a number of characteristics that are typical of things of that kind, but no single one of those characteristics is essential for being defined as things of that kind. Sounds confusing when you say it like that, but maybe an example will help…
For example, essentialist definitions become problematic when trying to define concepts like “religions,” or “games,” which is the example famously used by Ludwig Wittgenstein (probably the most important philosopher of the 20th century, if not ever, IMHO). He explained that when we consider various games, such as card games, ball games, board games, puzzle games, video games, and games like “Ring Around the Rosie,” we see that they share a number of characteristics of a category of things we know as “games,” such as being fun, being played with others, ending with a winner and a loser, having rules, but none of these characteristics is essential for being called a “game.” For things like games (and religions), this polythetic way of defining may be better, because no single characteristic is common to all games (or religions), but they share some characteristics. Wittgenstein referred to this aspect of defining things as a “family resemblance.”
Although some common definitions of “religion” include having to do with the supernatural or the the mysterious, such concepts may be foreign to some interpretations of some religions. Similarly, most definitions include reference to God or gods but this theist concept is not necessary for many Buddhists, for example.
Religions are cultural constructs, which are all similar to each other in a family-resemblance sort of way, often including worship of God or gods, and almost always involving shared experiences in a community, stressing a separation between the sacred and the commonplace.
Sometimes religion also seem to me to be our species’ first attempt at ethics, and our first attempt at explaining our physical world. I think that we have better ways of explaining the world now, and ethics, while still being important to religion, can also exist independent of religion (insofar as anything can exists independent of religion). In other words, the fact that religion is embedded everywhere in our daily lives doesn’t mean that one needs religion to be moral. Necessary or not for explaining our world and providing a moral compass, religions clearly are credited for much else: they seem to unite, comfort, and protect many people. And they are blamed for much else: viz, for much cultural, structural, and direct violence. This leads some (including myself sometimes) to tally on the world’s ledger the “good” and “bad” effects of religion on the world, but this may turn out to be rather unhelpful, since one thing that religions are not, are actors with agency in the world.