Bhagavad Gita 13.21

कार्यकरणकर्तृत्वे विकासः प्रकृतिरूच्यते |
पुरुषः सुखदुः भोजनं भोक्तृत्वे थाइरुच्यते

Translation

In the matter of creation, the material energy is responsible for cause and effect; in the matter of experiencing happiness and distress, the individual soul is declared responsible.