I'm seeing a lot of international messages getting this wrong, so this is how you refer to the Prime Minister of the UK.
First, we normally refer to the PM just by name, like anyone else. So, "Keir Starmer" or "Mr Starmer".
"Prime Minister" is not used as a title like "President" is. He's not "Prime Minister Starmer". He's just "the Prime Minister" or "the Prime Minister, Keir Starmer".
Unusually, this new PM is also a knight. Of course, this has its own rules.
If you want to use this title, it's not quite as simple as replacing "Mr" with "Sir'. The first name is more important than the surname here. He's not "Sir Starmer". He's "Sir Keir Starmer" or "Sir Keir".
The Right Honourable Member of Parliament Sir Keir Rodney Starmer, Knight of the Most Honourable Order of the Bath, King's Council to His Royal Majesty Charles the Third, by the Grace of God of the United Kingdom of Great Britain and Northern Ireland and of His other Realms and Territories, King, Head of the Commonwealth, Defender of the Faith, Lord of Mann, Prime Minister of the United Kingdom of Great Britain and Northern Ireland.
Anything less is offensive and requires a licence.