Right. The difficult thing is determining the difference between the written law, the actual law, and mere custom.
For example, the custom is that the Queen will appoint whoever she believes to be most likely to hold the confidence of parliament as the prime minister. Obviously the best candidate is usually the leader of the majority party or a collation that has a majority.
De Jure, however, she may appoint anyone (besides herself?) at any time for any reason. She would be stupid to do anything other than what is customary, but if she did, I am pretty certain the consensus would be that doing was was legal if unwise. After all, this has already happened in a form by way of the Governor General in Australia infamously dismissing the prime minister to enable Supply to be passed, and new elections held, which clearly violates the custom.
The selecting prime minister case is also interesting as it is one of the few where the custom is not based on the advice of Her Majesty's Government because of the obvious conflict of interest there.
On the other hand, while all Royal Prerogatives are de jure the Queen's, many of them arguably can only be exercised by the State/Government, which is clearly a distinct entity from the Queen, despite the laws constantly identifying the two as one and the same (the laws identify both the hereditary office of the Monarchy and the executive organ of the state as the Crown, despite those obviously being distinct things in reality). For example, If the Queen tried to seize control of the Armed Forces away from her Government/MoD, this might be deemed unlawful despite control of the the armed forces being a reserve power, and her being the nominal commander in chief.
One of the nice things about a good written constitution is that it helps to differentiate what is merely custom vs what is the actual law. Of course, the actual law and the written law can still differ, but it does help to avoid assuming what is merely a custom is the de jure law.