When you have vanity you are conceited: you are vain. “You’re so vain you probably think this song is about you.” This spelling can also mean “futile,” as in “All my love’s in vain” (fruitless). Note that when Ecclesiastes says that “all is vanity” it doesn’t mean that everything is conceited, but that everything is pointless.
A vane is a blade designed to move or be moved by gases or liquid, like a weathervane.
A vein is a slender thread of something, like blood in a body or gold in a mine. It can also be a line of thought, as in “After describing his dog’s habit of chewing on the sofa, Carlos went on in the same vein for several minutes.”