Errors downloading NuGet packages

I use a C# project, and it downloads a lot of components from NuGet, but I frequently have the following error while downloading: OpenSSL SSL_connect: Connection reset by peer in connection to globalcdn.nuget.org:443. It looks a lot like a rate limiting, but I don’t know much about C#, and I’d like to know if anyone has a fix for this?

Right now my workaround is to launch nixos-rebuild switch many times…