On 7 July, Boris Johnson gave a statement announcing his resignation. However, his resignation would not be immediate. Instead, a leadership contest was created, so that the next PM will be voted in. By the start of September, they were only two candidates left Rishi Sunak and Liz Truss. On 5 September it was announced that Liz Truss had won the contest and would be the next Prime Minister.
After the new Prime Minister was announced, Boris Johnson gave his final speech as Prime Minister on 6th September. He would give this speech and then travel to Balmoral to see Her Majesty The Queen, to present his resignation.
Final speech
"... above all thanks to you, the British people, to the voters for giving me the chance to serve
all of you who worked so tirelessly together to beat covid to put us where we are today
Together we have laid foundations that will stand the test of time
whether by taking back control of our laws or putting in vital new infrastructure
great solid masonry on which we will continue to build together
paving the path of prosperity now & for future generations
and I will be supporting Liz Truss and our new government every step of the way.
Thank you all very much." - Boris Johnson