Victoria became Queen when she was only 18
At birth, Victoria was fifth in line of succession, behind King George III's four eldest sons including George IV, Frederick, Duke of York, William IV, Duke of Clarence, and Edward, Victoria's father, Duke of Kent. It is challenging for the two eldest brothers to produce additional legitimate offspring because neither the Prince Regent nor the Duke of York has any living children, are divorced from their spouses, or are past reproductive age. In addition, the legal daughters of William and Edward were married on the same day in 1818, but both of them passed away as infants. Princess Charlotte was the first of these, and she passed away on March 27, 1819, two months before Victoria was born. When Victoria was just a few months old, her father passed away in January 1820. Her grandpa passed away a week later, and his eldest son George IV became king in his place. In that period, Victoria was third in line to the throne behind Frederick and William.
Then, the Duke of York died in 1827, followed by George IV in 1830; The throne passed to their next surviving brother, William, and Victoria was thought to be the heir.
Queen Victoria describes the event that changed her life in these words: "I just in my dressing robe, went into my sitting room alone and saw them. Lord Conyngham then informed me that I had succeeded my sad uncle, the King, who had passed away at twelve minutes past two this morning". That is exactly what happened just a month after she turned 18.
In the event that William passed away while Victoria was still a juvenile, it was clearly stated in the Regency Act 1830 that Victoria's mother would serve as regent. As a result of his lack of confidence in the Duchess' abilities to serve as regent, King William said in her presence in 1836 that he intended to live until Victoria became 18 in order to escape regency.
The little princess became King William IV's closest surviving heir to the throne as her father, his siblings, and any other legal heirs died over time. Victoria, who was not meant to be the next monarch, embraced her new responsibility with amazing confidence. And Victoria became Queen when she was only 18.