etany api tu karmani
sangam tyaktva phalani ca
kartavyaniti me partha
niscitam matam uttamam
All these activities should be performed without attachment or any expectation of result. They should be performed as a matter of duty, O son of Pritha. That is My final opinion.
Commentary by Srila Prabhupada
Although all sacrifices are purifying, one should not expect any result by such performances. In other words, all sacrifices which are meant for material advancement in life should be given up, but sacrifices that purify one’s existence and elevate one to the spiritual plane should not be stopped. Everything that leads to Krishna consciousness must be encouraged. In the Srimad-Bhagavatam also it is said that any activity which leads to devotional service to the Lord should be accepted. That is the highest criterion of religion. A devotee of the Lord should accept any kind of work, sacrifice or charity which will help him in the discharge of devotional service to the Lord.
Commentary by Sri Visvanatha Cakravarti Thakur
In this verse the Lord shows the method by which these actions become purifying.
Giving up the misconception of being the doer (sangam tyaktva) and also seeking results (phalani), one should perform those actions. Giving up the idea of being the doer and giving up seeking results is tyaga and this is also called sannyasa.