Check out example codes for "has apple distribution certificate installed but its private key". It will help you in understanding the concepts better.

Code Example 1

Up to date (Jully 2020) (xcode 10 - 12)
- go to Xcode - Preferences - Accounts - Manage Certificates
- Click on the + at the bottom left, then Apple development
- Wait a little, then click Done

That's all. You may want to revoke the old certificat on developer.apple.com too.

https://stackoverflow.com/questions/47256780/distribution-certificate-private-key-not-installed

Learn ReactJs, React Native from akashmittal.com