Charles IV was King of Spain from 1788 until he abdicated on March 19, 1808.
Suppose he does not abdicate. Suppose he remains sovereign until his death in 1819.
Suppose he has no son as Ferdinand VII.
Thus the eldest son of Charles IV is the Infante Charles, Count of Molina.
The Infante Charles becomes King Charles V of Spain. What happens then?