Bhagavad Gita · 4.15
एवं ज्ञात्वा कृतं कर्म पूर्वैरपि मुमुक्षुभिः।कुरु कर्मैव तस्मात्त्वं पूर्वैः पूर्वतरं कृतम्॥
evaṁ jñātvā kṛitaṁ karma pūrvair api mumukṣhubhiḥ kuru karmaiva tasmāt tvaṁ pūrvaiḥ pūrvataraṁ kṛitam
Having known this, the ancient seekers of liberation also performed their duties. Therefore, you too should perform action as the ancients did in earlier times.
— Bhagavad Gita 4.15
Source: Sacred-Texts.com (Sanskrit) + Bhagavad-Gita.io (translations)