Royals with titles don’t have last names, their names are simply their title. Queen Elizabeth was born with the last name Windsor. But that wouldn’t have been the case before 1917, the year her grandfather, King George V, decided to not only switch his house name from Saxe-Coburg-Gotha to Windsor in order to head off anti-German sentiments during WWI, but also designated Windsor as the royal family’s official surname going forward.
Before 1917, British royals went only by their first name and the name of the house or dynasty they belonged to, such as Tudor or Hanover—i.e., Queen Victoria of the House of Hanover. Following her marriage to Lieutenant Philip Mountbatten—later Prince Philip—in 1947 and her ascension to the throne in 1952, Queen Elizabeth II made a slight adjustment to her grandfather’s naming decree by adding a hyphenated “Mountbatten” to the last name of her descendants to reflect the surname of her husband.
Members of the Royal Family can also use a last name from their family’s official title. For example, Prince Harry and Prince William were known at school and in the military as Harry Wales and William Wales, a surname that derived from their father’s official title. Prince George, meanwhile, has taken the surname Cambridge at school, from his father’s title as Duke of Cambridge.
Now that she’s ascended the throne, the Queen normally signs her name as "Elizabeth R." The R stands for "regina," which means queen in Latin. Again, "regina" is not her last name but rather an indication of her title. The Queen belongs to the house of Windsor, and her descendants can use Mountbatten-Windsor as their last name. So if she ever needed a last name it would likely be either Windsor or Mountbatten-Windsor.