There are two instances when you use "y" as a consonant: when it begins a word, and when it begins a syllable.
a
consonant is a
speech sound that is articulated with complete or partial closure of the
vocal tract
If "y" is being considered a consonant when it precedes all other letters in a word or is the beginning of a syllable, it is because of the SOUND it makes, you dope.
Go into a store and ask for "AN yellow paint sample".
Do it.
The "y" in "you" and "you're" is a consonant SOUND. Therefore, you would NEVER use "an" before "you" or "you're" since both words start with a consonant SOUND.
AGAIN, you get it wrong.
AGAIN you think that repeating an error will eventually make it right.
NOPE. You failed. AGAIN.