If you're seeing the word for the first time and need to figure out how to pronounce it, how would you know that “y” is acting as a vowel and not as a consonant in the first place?
If it's followed by a vowel, it's likely a Germanic word: yule, your, young, yellow (and you probably know the word, since our core vocabulary is still mostly Germanic). If it's at the end or between consonants, like syllabary or ontogeny, probably Greek.
You might also just happen to know a smattering (or even a lot) of Greek and Latin.
You might also just happen to know a smattering (or even a lot) of Greek and Latin.