The second text uses literally in its traditional sense: in a factual, non-exaggerated way.
Desmond's new kitten—barely three weeks old—was literally the size of a softball; it could just about fit in the palm of his hand.
The first text uses literally in its nontraditional sense: nearly or in effect (often exaggerated). Desmond's new kitten is not actually just a ball of fluff.
Desmond's new kitten—barely three weeks old—was literally just a ball of fluff in the palm of his hand.
Most style guides recommend to avoid using the nontraditional sense of the word literally because it is generally considered incorrect.
Which text uses the word literally in its traditional sense?
A: Desmond's new kitten—barely three weeks old—was literally the size of a softball; it could just about fit in the palm of his hand.
B: Desmond's new kitten—barely three weeks old—was literally just a ball of fluff in the palm of his hand.