How cultural learning and cognitive biases shape religious beliefs