Check out example codes for "how to change the default version dotnet version". It will help you in understanding the concepts better.

Code Example 1

dotnet new globaljson --sdk-version [Type version number here] --force

version number examples:
- 2.1.509
- 3.0.100-preview-010184

Code Example 2

{
  "sdk": {
    "version": "3.0.0"
  }
}

Code Example 3

{
  "sdk": {
    "version": "2.1.103"
  }
}

Learn ReactJs, React Native from akashmittal.com