https://developer.apple.com/tutorials/swiftui/creating-and-combining-views
Post
Replies
Boosts
Views
Activity
It's not enough to delete it from your keychain, the certificate is still present in Apple Developer Center at this point.
To remove it completely do the following:
Log in to Apple Developer Center
Find the certificate in question and click it
Now click the "Revoke" button (see attached screenshot). Certificate should disappear.
Go back to Xcode and refresh the dialog. Now it should be gone.*
If it's not gone after you have done this, it just means it's still present in your keychain locally, so just remove it from here as well and you should be good.
ref: How do you delete a Signing Certificate from Xcode?