The outcome of the vote will be announced on 5 September.
But the struggle will not end there.
Whoever emerges victorious will face a daunting array of challenges when they arrive at No 10.
Here are the six biggest issues the next prime minister will have to tackle straight away.
Cost of living crisis
UK inflation has officially hit a 40-year high, with the Office for National Statistics reporting that consumer price inflation (CPI) reached an annual rate of 9.4% in June - up from 9.1% in May.
The cost of food, energy and fuel has skyrocketed in particular, putting an intense strain on households and families.
It’s only set to get worse in the coming months, with energy bill hikes due to arrive in October as the price cap rises to more than £3,000.
Meanwhile, interest rates are also rising, and economists have warned that the UK could face a recession in the third quarter of the year.
This means the new prime minister will likely face huge pressure to provide support to those struggling.
The UK has been hit by a wave of strikes in the past few months, adding pressure to the country’s already-struggling economy.
But as real wages continue to fall, it is unlikely the strikes will stop anytime soon - and this will be a major challenge for the next prime minister in autumn.
Strikes from airline workers are continuing to cause chaos in the travel sector, and railway workers have announced four days of strikes in July and August in a dispute over pay and working conditions.
Following the Government’s pay increase for NHS workers - which did not match the unions’ wishes - many healthcare workers are predicted to strike too.
Boris Johnson won credit for helping lead Europe’s response to the Russian invasion of Ukraine, with more than £2.3 billion given to the country in military support.
His successor will be under pressure to follow in his footsteps.
In the short term, this likely means Mr Sunak or Ms Truss will need to provide more weapons and economic support to Kyiv.
In the long term, the new prime minister will need to decide whether to increase the UK’s defence spending - and figure out how to cope with no longer using Russia’s gas supplies.
In her leadership bid, Ms Truss has already said that as prime minister she would want defence spending to be 3% of GDP by the end of the decade - above the current Nato target of 2%.
Mr Sunak has vowed to prioritise funding for the armed services, and has committed to maintain current defence spending levels.
Following months of government scandals - from lockdown breaches and ‘Partygate’ to the allegations against Chris Pincher - the new occupant of Downing Street will have to work hard to convince the public they are different from their predecessor.
In June 2022, a YouGov poll found that 74% of people thought the Prime Minister was “untrustworthy” - a sharp rise from 42% in April 2020.
If he becomes PM, Mr Sunak will have to face up to his involvement in the scandals.
The former chancellor received a fine following the ‘Partygate’ report by Sue Gray, so he will have to prove to the public he can be trusted in the future.
Ms Truss did not receive a fine during ‘Partygate,’ but she was one of the few members of the Cabinet who did not resign from office following the Chris Pincher scandal - which some perceived as condoning the Prime Minister’s handling of the situation.
This decision may be the toughest challenge for the Foreign Secretary to overcome in terms of re-gaining the trust of the public.
Matthew Taylor, chief executive of the NHS Confederation, recently wrote on the organisation’s website that “Liz Truss and Rishi Sunak need a dose of realism on the NHS”.
He said: “Let’s be clear, the challenges faced by the NHS are big - austerity and underinvestment over the past decade have left over 105,000 staff vacancies at the last count, as well as crumbling buildings and an NHS estate ill-equipped to deal with 21st-century healthcare demands.
“We need the government and future Prime Minister to be honest with the public about the scale of the challenge facing the NHS… [which] must include a proper acknowledgement of where the lack of investment during the 2010s has left the NHS, and the huge gulf between levels of demand and capacity.”
He added that the next government needs to provide short-term, targeted action as well as a long-term vision and clear roadmap for the future of the NHS.
With strikes from healthcare workers potentially imminent, and the cost of living crisis mounting, the next Prime Minister will be under pressure to outline what support the Government will offer the NHS.
In 2019, the Government pledged to reach net zero by 2050, making the UK one of the first countries to commit to the climate change emergency.
But the Climate Change Committee has warned that the UK is currently on track to cut only 40% of the emissions required to reach net zero.
The importance of these targets has recently been thrown back into the spotlight by the UK’s record-breaking heatwave - which saw temperatures of 40C - and a series of devastating wildfires that have torn through Europe.
Therefore, although Mr Sunak and Ms Truss have both promised to adhere to the Conservative Party’s net zero target, these recent developments mean they will likely be expected to promise more commitments - and take serious action to get the UK back on track for 2050.