Or run hugo mod vendor which will create a copy of all modules in your repository that you can commit with the repo.
hugo mod vendor