royalty don’t actually have surnames, so they take their title as a last name when it’s needed. William and Harry (used to) use Windsor as a last name, but now William would use Cambridge, as would Kate/Catherine, so she didn’t keep or give up any name.