Earlier quoted context omitted.
How? If Parliament fails the queen doesn't start writing laws, we'd have had a revolution.
Parliament has failed many times, including at least once in the last decade. When it does, the Queen appoints whoever can form a credible government to be the prime minister.
Because if she did anything else someone else would. Constitutions barely mean anything when tested, our unwritten constitution might isn't worth fuck all