The heir to the throne dethroned her.
It is no secret to anyone that since Princess Leonor came of age, many changes would arise with them, such as the responsibilities and obligations that Queen Letizia had been carrying out as the queen consort.
Previously, Letizia was designated to receive the regency of the throne in the event of the incapacity or resignation of King Felipe, due to the minority of her first-born daughter. However, now that her daughter is of legal age and having sworn fidelity to the Constitution, she herself is in a position to succeed her father in the aforementioned cases, without the need for an intermediary regent.
During the princess's minority, the Constitution established that the closest relative to the throne would assume her regency. In this case, the consort was planned as the regent, being Eleanor's closest relative.
But now, everything has taken a drastic turn, with the future queen being of age, so the need for a regency disappears and the princess is in a position to act directly as queen if necessary.
This change represents a new stage for both Princess Leonor and Queen Letizia, who will continue to play their respective roles in the Spanish monarchy based on this new legal dynamic.