How to identify the conditions in which a variable value occurs?

I’m a novice in statistics and totally new to Exploratory, with what might be a silly question. If so, sorry!

I have a bunch of socio-economic variables and a bunch of religion variables for a dataset. Is there a way to identify the socio-economic conditions in which a certain value for a religion variable occurs?

I thought that if I filter out all those rows which don’t have the right value for the religion variable I’m interested in, I could then look at the two groups - those with this value for the religion variable, and those without - and somehow compare them to see what is distinctive about each group, in order to identify the crucial socio-economic traits which all that religious phenomenon to occur.

Would anyone have ideas about better ways to do this? Thanks!