Fanning the hands is an effect of Burning Hands
This is not a question if the first sentence of a spell is flavor text or not. SSD's answer provides an in-depth, convincing argument that it can not be flavor text. The problem is what to do if you accept that it is not flavor text.
The rules for Casting a Spell (p. 202 PHB) say:
Each spell description in chapter 11 begins with a block
of information, including the spell’s name, level, school
of magic, casting time, range, components, and duration.
The rest of a spell entry describes the spell’s effect. [Emphasis added]
So, according to the rules the body of text in a spell description is not just the overall description of the entire spell, it is the effect of the spell, once successfully cast. There is a clear separation between other parameters like range, casting time, duration on the one hand, and effect on the other hand.
Spells like burning hands that describes how you fan your hands touching to shoot out flames, or message that describes how you point at a creature to send a message to it, seem to describe the casting, not just the effect of the spell. But technically, these gestures are not part of the somatic component of casting the spell. The component are listed in the components line of the spell. That would be the right place to include specific somatic movements. Other than for material components, which provide details (in parentheses) for the specifics required, there are no examples for this kind of details for Somatic Components. The only rules we get for Somatic Components are (p. 203, PHB):
Spellcasting gestures might include a forceful gesticulation or an intricate set of gestures. If a spell requires a somatic component, the caster must have free use of at least one hand to perform these gestures.
As per the rules, as long as you have one hand free to perform gestures, you can cast the spell.
As discussed by AceCalhoon, the core rules do not specifiy in any detail what happens if only part of a spell's effect fails or is not possible. Does the spell magically make the impossible happen? Does that part of the spell (touching thumbs) fail, but the rest works? Does the whole spell fail?
While the core rules do not provide much guidance on this, Xanathar's Guide to Everything provides an optional rule for resolving invalid spell targets. It states (p. 85-86):
If you cast a spell on someone or something that can’t be affected by the spell, nothing happens to that target, but if you used a spell slot to cast the spell, the slot is still expended. [emphasis added]
Burning Hands has a range of Self (15-foot cone). What counts as a target for a spell is not sharply defined, but with self as range, and with their hands being part of the effect of the spell, it seems reasonable to consider the caster a target. If you use the optional rule, when a target is illegal nothing happens to that target: if the caster has only one hand, the effect of fanning the hands fails for them; if they have two hands but one hand is occupied, the spell would make them fan the hands, possibly dropping their staff in the process (as some other answers discuss, it might be possible to fan your hands and still hold on to the staff in doing so).
If the effect on other targets, caused by spewing forth a fan of fire and needing to save for fire damage, would still happen is not clear to me as the fan is said to spew forth from the outstretched fingertips; if there are no fingertips to spew forth from, that effect may not happen either.