Abilities often have two sections; the second part is the mechanics
In 5e all of the spell text is rules.
That being said, however, it is clear that in practice many spell effects and class abilities are written with two distinct sections in different styles. The terms 'fluff' (or 'flavor') and 'crunch' are loaded, and again, the entire description is rules text. I think it is more accurate, and useful, to consider the two sections as operating from two perspectives, both within the rules but from different parts of the rules. The first describes the feature from an in-character or narrative perspective, while the second relates what the game mechanical effects of the ability are, in the meta-narrative sense.
Steve's answer gives the Rogue's Evasion ability as an example, where the first sentence is what the ability does from the perspective of the Rogue:
[Y]ou can nimbly dodge out of the way of certain area effects, such as a red dragon's fiery breath or an ice storm spell.
The second sentence describes how the ability actually interacts with other game features, and no mention is made of it being limited to area effects.
Another example is the Lore Bard's Cutting Words feature, where the first sentence is:
[Y]ou learn how to use your wit to distract, confuse, and otherwise sap the confidence and competence of others.
This is how the ability functions from the in-character perspective of the Bard, but none of it is relevant for adjudicating the interaction of the ability with other game effects. The next sentence, however, says:
When a creature that you can see within 60 feet of you makes an attack roll, an ability check, or a damage roll, you can use your reaction to expend one of your uses of Bardic Inspiration, rolling a Bardic Inspiration die and subtracting the number rolled from the creature’s roll.
This is clearly how we are meant to apply the ability to other game features, and it is something the DM and the Bard's player know, but which the in-character Bard does not. The rest of the description continues to be meta-narrative and contains other explicitly mechanical effects about when the ability may be used.
Usually the entirety of a description can be applied intuitively, without bothering to break the descriptions into the in-character and the meta-narrative part. However, one can sometimes be tripped up by insisting that even the first part of the description is mechanical. For example, a DM might mistake the word "dodge" in the first sentence of the Rogue's Evasion and mis-rule that the ability could be used only when the Rogue was already Dodging, or that it granted the Dodge action whenever the Rogue was included in a damaging area effect. Likewise, one could read the in-character part of the Arcane Archer's Shadow Arrow and think that the blinding ability can only be applied to foes. There are many possible pitfalls to insisting that the first part of a spell or ability description is mechanical.
We can now examine what Absorb Elements is trying to say, through this lens. The first sentence is from the in-character perspective of the spell caster:
[When you would take acid, cold, fire, lightning, or thunder damage, t]he spell captures some of the incoming energy, lessening its effect on you and storing it for your next melee attack.
What the caster knows is that the spell protects them from damage, and powers their next attack. The caster, however, doesn't have an in-character concept of rounds and game turns. That is meta-narrative, and belongs with the second part of the spell description:
You have resistance to the triggering damage type until the start of your next turn. Also, the first time you hit with a melee attack on your next turn, the target takes an extra 1d6 damage of the triggering type, and the spell ends.
This part is the mechanical effects of the spell, and it is what should be referred to by the caster's player and by the DM. As such, the spell does not contradict itself. If you attack on the same turn you cast the spell, you do not get to apply the bonus damage to your attack.