The royal protocol indicates that in the absence of the monarch and the heir, Counsellors of State are appointed to act on their behalf. Traditionally, this group includes the monarch's spouse and the four most senior members in the line of succession over the age of 21. However, recent changes excluded Prince Harry and Prince Andrew from this list due to their non-working royal status.
The current Counsellors of State are Queen Camilla, Prince William, Princess Anne, Prince Edward, and Princess Beatrice. While Prince Harry theoretically remains an option, his non-working royal status and residence outside the UK make it less likely for him to take on such responsibilities.
In practice, the situation would be challenging, and the royal family may explore other solutions to ensure the smooth functioning of the monarchy during this period of health concerns.