His elder half-brother, Don Carlos, had died in 1568, which meant that he was the new heir-apparent at birth and therefore Prince of Asturias.
In 1568, when his elder half-brother, Don Carlos, died, he became the newborn heir-apparent and hence the Prince of Asturias.