The summit marks the first time G20 leaders are meeting since Russia's February invasion of Ukraine, which Moscow describes as a "special military operation".
Russia has been India's biggest supplier of military equipment for decades and it is the fourth-biggest market for Indian pharmaceutical products.
India has become Russia's largest oil customer after China, as its refiners snap up discounted cargoes of crude oil shunned by Western buyers.
Indian officials have said domestic refiners will continue to buy Russian oil at a discount - despite the efforts of the United States and Western allies to impose a price cap on Russian oil exports - because this benefits India's economy.
There should be no restrictions on energy supplies and stability in the energy market should be ensured, Modi said.
"India's energy security is also important for global growth," said Modi, according to a statement released by the Indian foreign ministry.
"Today's fertilizer shortage is tomorrow's food crisis, for which the world will not have a solution. We should make a mutual agreement to keep the supply chain of both fertilizers and food grains stable and assured," Modi also said.