If this does not happen often in your document, the simplest thing to do is to insert commas (",") manually between the footnote numbers, then format them using the style Footnote Reference (that's the name in the English-language version of Word, anyway).
I say "simplest" with caution because it may not be at all obvious how to do that. But e.g.
- Select the comma
- In the Ribbon, navigate to the Home tab, Styles group
- Click the Dialog Launcher icon at the bottom right of the group. That displays a task pane showing the styles.
- If you don't see the
Footnote Reference style in there, click the Options button and select All styles under Select styles to show.
- Find and select the Footnote Reference style and apply it to the selection.
You may find it easier to insert one comma formatted that way and save it as an autotext or autocorrect for re-use.
If it is something you need a lot, and/or you also need to replace footnote references such as 34,35,36,37 by 34-37, then you will need to decide what rules to apply, and you will need some VBA or equivalent code to apply them. For the rules, for example, how many contiguous footnote markers before you use a hyphen (or perhaps a dash) so you have 34-37 rather than 34,35,36,37? What if there are other references such as endnotes in the middle?