Ginger is one of those ingredients that freezes really well. In fact, freezing ginger can make it easier to peel and grate. As an alternative, freeze it after you grate it for quicker meal prep.
The Kitchn explains the best way to store it in the freezer:
To freeze ginger, first peel and mince, or grate it. Then spread or scoop the ginger onto a parchment-lined tray. I like making teaspoon-sized portions. Freeze until solid and transfer to an airtight container. It should keep for about six months…
They suggest putting those frozen portions right into recipes, as long as it doesn’t require thawing. If you want, you can use both freezer tips in conjunction: Freeze your ginger, then grate it and refreeze the result. After all, if you’re going to dirty a grater, you might as well do it only once.