The Monarch can dismiss the Prime Minister, but only under extremely specific circumstances, where a Prime Minister or government is acting totally contrary to constitutional practice. This is very unlikely to happen in the United Kingdom.
It did happen in Australia in 1975 - the Governor-General (the Queen’s representative) actually made the decision, not the Queen herself - but that was such an exceptional case. The socialist government had lost the ability to pass a budget, and the Prime Minister refused to follow normal constitutional practice in advising the Governor-General to call an election. I hope no British government would ever be that incompetent and then try to double down on it. The Australian Prime Minister involved was exceptionally arrogant and ignorant of his constitutional position.
The monarch’s powers to intervene exist to deal with the most serious type of constitutional crisis - not a government going just a little bit far, but one that is verging on being out of control to the extent they are going beyond their generally accepted powers.
The ultimate tipping point in Australia in 1975 was the Prime Minister telling the Governor-General his only plan to deal with the budget crisis was to illegally order the Commonwealth Bank (at that time a government owned and operated bank) to loan the government money. That was a massive overreach of authority. Just asking for a loan, wouldn’t have been - but the PM was afraid they would say no, so he went a step too far.