It came as Iraq agreed a deal with German company Siemens Energy to upgrade the Iraqi power grid.
Mr Al Sudani said Iraq wants to make better use of its large gas reserves and potentially export them to Europe, while Germany is looking for new suppliers after Russia turned off the tap.
“We talked about possible gas deliveries to Germany and agreed to stay in close contact on this subject,” Mr Scholz said in Berlin.
Iraq wants to help meet global energy needs while also stimulating its domestic economy, said Mr Al Sudani, who added that gas deliveries to Europe could be made through Turkey.
He said German companies could help address the problem of gas flaring — the waste of resources that occurs when excess gas is burnt during oil production.
Iraq has the world’s 12th-largest proven gas reserves but is the second-worst offender in flaring, behind Russia, according to the International Energy Agency.
“We are striving for a better use of flared gas, and correspondingly we can use gas much better and more efficiently,” Mr Al Sudani said.
“We offered during today’s visit that German companies can invest in these areas and be present in Iraq.”
Mr Scholz also offered Germany’s help in diversifying Iraq’s economy away from fossil fuels and reducing its carbon footprint, including through the use of solar power and hydrogen.
“Iraq is already one of the countries most affected by the climate crisis, and the challenges will continue to grow in the coming years. We want to help,” Mr Scholz said.
To help the decarbonisation drive, the Siemens plan signed with the Iraqi electricity ministry aims to increase Iraq's power generation by 11 gigawatts.
The Siemens deal “is an immense contribution to a climate-friendly, sustainable and reliable energy production in Iraq,” said German Economy Minister Robert Habeck.
Germany last month started importing gas on the world market for the first time after hurriedly building terminals on its North Sea coast.
It came after Russian exporter Gazprom shut down the Nord Stream 1 pipeline that had previously supplied Germany with much of its gas.
Germany has held talks with the UAE, Qatar, the US, Canada, Norway and other possible gas suppliers since Russia cut off exports.
Mr Scholz rejected the argument made by some activists that Germany’s shopping for gas has gone too far and will lead to an excess of supply.
He said Germany saw its role as a transit country that can supply neighbours such as Austria, the Czech Republic and Poland.
“That is something we will need to invest in much more and we are a long, long way away from excess capacity,” he said.