u in unicorn is not a vowel it is constant , you spell it as "you" not as "an" as in "unnecessary"
Vowels and consonants are sounds, not letters. Depending on your accent and how thinly you slice them, there are about 20 vowels and 24 consonants.
The difference between vowels and consonants
A vowel is a speech sound made with your mouth fairly open, the nucleus of a spoken syllable.
A consonant is a sound made with your mouth fairly closed.
When we talk, consonants break up the stream of vowels (functioning as syllable onsets and codas), so that we don’t sound like we’ve just been to the dentist for four fillings and the anaesthetic hasn’t worn off yet.
Consonants require more precise articulation than vowels, which is why children find them harder to learn, and often end up in speech therapy after having become so cross at not being understood that they’ve started hitting people.
Only a few children with severe speech sound difficulties (often called dyspraxia or apraxia) sometimes need therapy to help them produce vowel sounds correctly.
Most syllables contain a vowel, though vowel-like consonants can occasionally be syllables. And to complicate matters, many English vowels are technically two or three vowels shmooshed together.