Installing this SDK solved the same issue for me:
Download .NET Core 3.1 (Linux, macOS, and Windows) (microsoft.com)