Bhagavad Gita 2.47

कर्मण्येवाधिकारस्ते मा फलेषु कदाचन।मा कर्मफलहेतुर्भूर्मा ते सङ्गोऽस्त्वकर्मणि ॥२.४७॥

karmaṇyevādhikāraste mā phaleṣu kadācanamā karmaphalaheturbhūrmā te saṅgo’stvakarmaṇi

Your right is only to work, but not to its results; do not let the results of action be your motive, nor let your attachment be to inaction.

गीता