Parliament doesn't have a direct role in appointing the PM - it's pretty much an internal party decision.
e.g.
https://en.wikipedia.org/wiki/2019_Conservative_Party_leader...
e.g.
https://en.wikipedia.org/wiki/2019_Conservative_Party_leader...
In contrast, US Presidents are elected with zero input from Congress and are often at odds with the House and/or Senate majority.