After arriving in Saudi Arabia, Mr Sunak said he did not want Hamas's terror attack to become a "catalyst for a terrible humanitarian crisis" in Gaza.
“We will work together to ensure regional stability and prevent a dangerous escalation”, he said in a post on social media.
Downing Street said Mr Sunak and Prince Mohammed agreed that the “loss of innocent lives in Israel and Gaza over the last two weeks has been horrific”.
Mr Sunak encouraged Saudi Arabia to use its influence to “support stability” in the region, his office said.
“They underscored the need to avoid any further escalation in the region and agreed to co-ordinate action on this front,” it said.
“The Prime Minister and Crown Prince agreed on the pressing need for humanitarian access into Gaza to provide vital water, food and medicine.
“The Prime Minister outlined the steps the UK has taken to address the increasingly urgent humanitarian situation, including announcing £10 million ($12.1 million) of further aid.
“The Prime Minister encouraged the Crown Prince to use Saudi Arabia’s leadership in the region to support stability, both now and in the long term.
“More broadly, the Prime Minister and Crown Prince looked forward to working together to advance areas of shared interest for the UK and Saudi Arabia, including on upholding regional security.”
After the talks, Mr Sunak said he had “an important and productive meeting” with Prince Mohammed.
“We agreed on co-ordinated action to prevent further escalation in the region, provide vital humanitarian aid in Gaza and support stability, both now and in the long term,” he said.
During the meeting, Prince Mohammed stressed to Mr Sunak the necessity of creating the conditions to restore stability and the path of peace, to ensure that “the Palestinian people obtain their legitimate rights".
“The Crown Prince and the British Prime Minister discussed the military escalation currently taking place in Gaza, and the international efforts made regarding it,” the Saudi Press Agency reported.
Prince Mohammed said that Saudi Arabia considers targeting civilians in Gaza “a heinous crime and a brutal attack”.
Mr Sunak is expected to stay overnight in Saudi Arabia after talks with the Crown Prince. No 10 is yet to confirm whether he will visit another Middle East capital before ending his two-day trip on Friday.
Mr Sunak earlier met Israeli Prime Minister Benjamin Netanyahu and President Isaac Herzog in Tel Aviv.
Mr Sunak, speaking at a joint media briefing after discussions with Mr Netanyahu, which lasted about two hours, said he was “proud” to stand with Israel and that the UK government “wants you to win”.
Downing Street has updated the number of Britons killed in Hamas’s assault on Israel since his arrival in Saudi Arabia.
“We can now confirm that at least nine British nationals were tragically killed in last week’s terrorist attacks," a spokeswoman for Mr Sunak said.
“And a further seven British nationals are missing, some of whom are feared to be among the dead or kidnapped.”
Mr Sunak, during his trip to Israel on Thursday, met two families who have loved ones being kept captive in Gaza.