There seems to be an inescapable conclusion to make regarding the subtitle of this excellent Victorian classic, and that is that the overarching theme of this novel is the way in which all of society and all in it are shown to be overwhelmingly vain. Some may be more vain than others, but the subtitle indicates that none, according to the author, can be called a hero.
It may be useful to recognise that the title is an allusion from Pilgrim's Progress and refers to a city, called Vanity Fair, whose soul purpose was to divert and entertain people with pleasures and goods and distract them on their way to reaching heaven. Thackeray places Vanity Fair in London during Victorian times, and presents us with a range of middle and upper class characters who only live for achieving greater wealth and higher social status, and show themselves willing to cheat, lie and deceive in order to reach those goals. Thus it is that Thackeray gave his novel the subtitle that it has: the pages of this novel are remarkable for the complete absence of anyone who matches up to the definition of the hero. All are self-serving characters.
The main part of the title, Vanity Fair, refers to a town encountered in Bunyan's Pilgrim's Progress which is devoted to self-indulgence and sensual pleasure. The sense of vanity echoes the words of the Biblical book of Ecclesiastes:
Vanity of vanities, says the Preacher,
vanity of vanities! All is vanity. (Eccl. 1.2)
The word "vanity" in this context means futility. Accumulation of worldly goods is seen from this perspective as ultimately meaningless. Thackeray's title suggests that in a world in which people are devoted to "vanities" rather than some form of ideals, heroism is impossible, as a hero is someone who makes great sacrifices and displays great bravery in pursuit of some ideal or noble goal.
The protagonist of the novel, Becky Sharp, is not heroic. She is a clever young woman who will do anything she can to acquire material goods. Having no other values or desires than material comfort and security, she has no real moral grounding. Thackeray uses his "puppets" (as his narrator refers to the characters) to show that the world of vanity fair is hollow and without deeper purpose, a sort of "house built on sand," subject to the vagaries of fortune. In such an environment, heroism is not possible, and the characters' only true goal is survival.