Complex sentence: However, Edward died shortly thereafter, leaving Victoria as heir to the throne until, upon the death of King William IV, she ascended as queen at the age of 18.
Split into simpler sentences: However, Edward died shortly thereafter, leaving Victoria as heir to the throne. Upon the death of King William IV, Victoria ascended as queen at the age of 18.