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 too.

Learn ReactJs, React Native from