Each Veda consists of four parts: the Mantra-Samhitas or hymns, the Brahmanas or explanations of Mantras or rituals, the Aranyakas, and the Upanishads. The division of the Vedas into four parts is to suit the four stages in a man's life.
Vedas primarily have 2 parts - Karma Kanda and Gyana Kanda. Karma Kanda contains all the prescribed rituals and chants, and material oblations to offer to the gods, which count as the sacrifice. It also asks blessings from the gods to assist in our personal day-2-day dharma.
Brihadaranyaka Upanishad 1.4.14
धर्मः तस्माद्धर्मात् परं नास्त्य् अथो अबलीयान् बलीयाँसमाशँसते धर्मेण
यथा राज्ञैवम् । यो वै स धर्मः सत्यं वै तत् तस्मात्सत्यं वदन्तमाहुर्
धर्मं वदतीति धर्मं वा वदन्तँ सत्यं वदतीत्य् एतद्ध्येवैतदुभयं भवति ।।
Nothing is higher than Dharma. The weak overcomes the stronger by
Dharma, as over a king. Truly that Dharma is the Truth (Satya);
Therefore, when a man speaks the Truth, they say, "He speaks the
Dharma"; and if he speaks Dharma, they say, "He speaks the Truth!" For
both are one.
The Upanishads are parts of the last section - Gyana Kanda which emphasized on the integration of spiritual wisdom with material rites and rituals. How material rites and rituals are linked with inner focus, one-pointedness (ekagrata), inward investigation (antarmookhi vichaar), non-duality (advaita) etc.
The Gyana Kanda speaks of all beings, gods and other entities as essentially the same in essence and totality, but different in transactional reality.
Brihadaranyaka Upanishad 4.4.22
Those who seek Brahman wish to realize It by the study of the Vedas,
by performing sacrifices, by giving gifts and by austerities.
आरुरुक्षोर्मुनेर्योगं कर्म कारणमुच्यते |
योगारूढस्य तस्यैव शम: कारणमुच्यते |
ārurukṣhor muner yogaṁ karma kāraṇam uchyate
yogārūḍhasya tasyaiva śhamaḥ kāraṇam uchyate
To the soul who is aspiring for perfection in Yog, work without
attachment is said to be the means; to the sage who is already
elevated in Yog, tranquility in meditation is said to be the means.
Krishna mentioned that there are two paths for attaining welfare—the path of contemplation and the path of action. Between these, he recommended to Arjun to follow the path of action. Again in chapter 5, verse 2, he declared it to be the better path. Does this mean that we must keep doing work all our life? Anticipating such a question, Krishna sets the limits for it. When we perform Karma yoga, it leads to the purification of the mind and the ripening of spiritual knowledge. But once the mind has been purified and we advance in Yoga, then we can leave karma yoga and take to karma sanyāsa. Material activities now serve no purpose and meditation now becomes the means.
So the path we must follow filters down to a matter of our eligibility and Krishna explains the criteria of eligibility in this verse. He says that for those who are aspiring for Yoga, the path of karma yoga is more suitable; and those who are elevated in Yoga, the path of karma sanyāsa is more suitable.