Today is Prince Edward’s 59th birthday and his brother, King Charles, has granted him the title HRH the Duke of Edinburgh (so Sophie will be the Duchess, and their son, James, takes on Edward’s old title of Earl of Wessex). Edward was promised at the time of his wedding that he would inherit his father’s title when Philip died, but King Charles has apparently been hesitating (as Philip’s eldest son he automatically inherited the title, but when he became king all of his titles merged back with the crown, so this is a new creation of the title, not a direct inheritance). His major concern was that this royal dukedom, usually held by senior members of the royal family, would move further and further away from the crown as Edward’s son and potential future generations inherited it (as is going to happen with the Dukedoms of Kent and Gloucester, two other important titles). So the solution is that Edward will hold it for his lifetime, but James won’t inherit the title. It makes sense, James and his descendants will never be working royals or have need of a royal dukedom (it doesn’t come with extra money or land or anything), and it’s in line with the slimming the monarchy idea, not having distant relations who are not working royals holding royal titles.
There is a difference between the so-called Royal Dukes, which are titles meant to be held by senior members of the royal family (York, Kent, Gloucester, Edinburgh, Cambridge, Sussex) and often revert to the crown or go extinct (no male heirs) and are recreated for another line of the family, and regular dukes (Norfolk, Northumberland, etc) which are strictly hereditary titles.