The following is what happens to hit points and hit dice at the end of a long rest (PHB p. 186):
At the end of a long rest, a character regains all lost hit points. The character also regains spent Hit Dice, up to a number of dice equal to half of the character's total number of them.
Under this normal rule, the following two effects occur at the end of a long rest: the character regains all their hit points, and the character regains half their hit dice. These effects are independent (they manipulate different resources), so the order they occur does not matter.
The Slow Natural Healing variant (DMG p. 267) changes that rule in the following way:
Characters don't regain hit points at the end of a long rest. Instead, a character can spend Hit Dice to heal at the end of a long rest, just as with a short rest.
Under the variant, the following two effects occur at the end of a long rest: the character regains half their hit dice, and the character can spend their hit dice to recover hit points. These effects are dependent (they manipulate the same resource), so the order they occur does matter. Here's the problem: the order is not stated in the text. It's an emergent property of how those two rules interact with each other, and that interaction is ambiguous.
Disregarding the possibility that they happen simultaneously (which I believe is still ambiguous), there are two well-defined orders:
The character regains half their hit dice, then they can spend their hit dice to recover hit points.
The character can spend their hit dice to recover hit points, then they regain half their hit dice.
To show the practical difference, suppose I have 2 of 5 hit dice (each is a d8 with a +0 CON modifier) and I spend as many as I can. Here's the result under each case above.
I regain 2 hit dice, leaving me with 4 of 5. Then I spend all 4 of them, leaving me with 0 of 5. I regained 4d8 hit points.
I spend all 2 of my hit dice, leaving me with 0 of 5. Then I regain 2 of them, leaving me with 2 of 5. I regained 2d8 hit points.
Since the results are different, the order must matter.
Which is the correct order: regain hit dice first or spend hit dice first?
I do not think there is a RAW answer, so a correct answer will likely be RAI.