You have a right to perform your duty, but not to enjoy the fruits (Bg 2.47 to 2.53)

Kṛṣṇa now gives one of the most famous instructions of the Bhagavad-gītā: we have the right to perform our duty, but the results are not ours to claim.