There seems to be possible contradiction between Gita and Vedas regarding rituals. Gita is supposed to be a condensed, easy to understand summary of the teachings of the Vedas. In the Vedas, there are numerous mentions and instructions of ritual sacrifice and holding yagnas and ritual worship. In the Gita, there is no mention of rituals or how to properly do yagnas. Why would Gita not mention ritual worship and yagnas which is central to the Vedas? Why does Gita not prescribe specific rituals while Vedas does?
Bhagavad Gita is not intended to cover the specific details of Vedic rituals. That's why even the dhyana shloka says:
सर्वोपनिषदो गावो दोग्धा गोपालनन्दनः । पार्थो वत्सः सुधीर्भोक्ता दुग्धं गीतामृतं महत् ॥
All the Upanishads are like cows, and Krishna is the milkman. Arjuna is the calf who enjoys the milk, and the Gita itself is the milk.
So Gita is a summary of the Upanishads. Rituals are not hard to understand or follow. Spiritual knowledge is hard to understand, and even harder to realize. Explaining the spiritual knowledge is the purpose of Gita.
There is no contradiction. Apart from the atheists there are 2 broad views on the nature of the Vedas and the goal of human life. Vedic fundamentalists consider the goal of human life to be heaven which can be attained by Yajna. Gita belongs to the other group which says the goal of human life is liberation from the endless Samsara which can be obtained through the purification of mind.
The criticism offered here is intended to draw the distinction between the outlook of the new Gospel of Bhagavata Dharma which Krishna preached and the outlook of the Vedic fundamentalists who followed the philosophy of Vedic ritualism, which is known as the Purvamimamsa system of thought. These ritualistic philosophers held that the purpose of the Veda is to induce man to perform rituals and fire sacrifices, which will gain him heavenly felicity. After death the Jiva will go to those heavenly regions where they will have the enjoyments of the fruits of the sacrifices they have performed. After the fruit-bearing effects of Karma are exhausted, the Jiva comes back to the earth to do more Karma enabling him to enjoy heavenly felicities again. Thus according to them, there is no salvation for the soul or getting out of Samsara. The soul goes from embodiment to embodiment on earth and other spheres enjoying the fruits of his actions. Their outlook therefore multiplies man's desires and ambitions, and they justify this by quoting the Vedas as authority. In the nature of things, their mind becomes 'many branched' or divided by all kinds of passing desires. They have no conviction about the ultimate destiny of man beyond what has been stated. They are just like wanderers and vagabonds in the expansive field of life.
In contrast to them are the Samkhyas and the Yogins. They have a spiritual world-view and a conviction regarding the ultimate destiny of man. They are free from desires. Their mind therefore gets united following a single goal, unlike that of the ritualists whose mind becomes 'many-branched' because of their changing desires and objectives. That 'single goal' of the Samkhyas and the Yogins is the realisation of one's spiritual nature as the Atman and one's integral relation with the Supreme Being. The realisation of the truth puts an end to the transmigration of the Jiva and he becomes united with the Divine.
In continuation of the thought of the previous verse [2.44] the limitation of Vedic fundamentalism is again stated in the expression traigunya visayah - connected with the three Gunas of Prakrti or Root-matter. So the Veda as understood by the fundamentalist, deals only with matters material i.e. life of the body, on earth and in heaven, as explained already. Arjuna is asked to accept the spiritual outlook nistraigunya, which sees in matter or Prakrti, only the shadow of the Spirit. The implication of accepting the primacy of the Spirit is given in the second line of the verse.
It must be understood that these and similar verses are not a condemnation of the Veda but a criticism of it as understood and interpreted by the fundamentalists. Really the Bhagavata Dharma which Krishna teaches is included in the Vedanta, or the Upanishads, which teach the nature of Jiva and Brahman and the way for realising the Brahman and attaining release from Samsara, which is identical with the teachings of Krishna. But the fundamentalists reject the Upanishads or interpret them as subsidiary to the ritualistic philosophy. So Krishna's criticism is directed against that way of thought, and his Bhagavata Dharma is the correct re-statement of the Upanishadic thought with an emphasis on the practice of devotion and dedicated work as the royal road to God's grace and salvation.
Commentary of Srimad Bhagavad Gita 2.42-45 by Swami Tapasyananda
So how does Gita deal with Yajna?
Gita 4.25-30 interprets various phases of man's physical, moral and mental life in terms of Yajna, the holiest and universally accepted rite of the followers of the Veda. Gita broadens the meaning of Yajna.
They (Yajnas) are roughly grouped as Dravya-yajna (sacrifice of material goods), Tapo-yajna (sacrifice through austerity), Yoga-yajna (sacrifice in the form of spiritual communion), Svadhyaya-yajna (sacrifice through religious study), and Jnana-yajna (sacrifce constituted of knowledge.
Commentary of Gita 4.25-30 by Swami Tapasyananda