I would like to display a numbered list, with all items in gray expect the last one.
In brief, below the desired output:
+ #text(gray)[First]
+ #text(gray)[Second]
+ #text(black)[Last]
Is there a way to modify the #enum function do this programmatically in typst?

Enums are a bit tricky, since typst does not number them and complains when you try to associate them with a counter (see https://github.com/typst/typst/issues/325)
However, if you only have very simple cases like the one you printed (no nested enums, funky spacing, non-text content, etc.), you can use something like this: