Bhagavad Gita
7.29

जरामरणमोक्षाय मामाश्रित्य यतन्ति ये । ते ब्रह्म तद्विदुः कृत्स्नमध्यात्मं कर्म चाखिलम् ॥

jarāmaraṇamokṣāya māmāśritya yatanti ye | te brahma tadviduḥ kṛtsnamadhyātmaṃ karma cākhilam ||

Translation

Those who strive for liberation from old age and death, taking refuge in Me — they know Brahman completely, the entire adhyatma (spiritual knowledge), and all karma.

Interpretation

Those who turn to the Divine with the specific motivation of liberation from the cycle of old age (jara) and death (marana) — the cycle of samsara — come to know three things completely: Brahman (the ultimate reality), adhyatma (the science of the Self, spiritual self-knowledge), and karma (the entire science of action and its consequences). This total knowledge is the fruit of sincere surrender to the Divine with the single-pointed goal of liberation.