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".
Canada's Westminster system the PM also gets Right Honourable as an title, going to assume it's similar based on some googling so you could totally use The Rt Hon Sir Keir Starmer, but I've very very rarely seen news media use full titles outside of reporting on ceremonial activities.