A long time ago, the Greek letter upsilon, which looks like “Y” and has a vowel sound, got added by the Romans to the latin alphabet, which became part of English. So that’s how the vowel form arose.
Later, old english had the letter yogh, which looks a little bit like a “y” and has the consonant y sound (kinda). But as the years went by, and old english turned into middle english, people started using the “y” symbol in place of the yogh symbol, and eventually that became permanent. So then the “y” symbol had two purposes: a vowel sound and a consonant sound.
Latest Answers