Xcode Certificate error as No certificate team matching

In Xcode (v 11.3.1) I am getting an error as No Certificate for team XXXX matching xxxx Distribution found.
select a different signing certificate for CODESIGNIDENTITY or switch to automatic provisioning.

Certificate was expired,so I regenarated the ceritificate and provisioning profile and updated in xcode.
Also downloaded the certificate and imported into keychain

Please suggest where I am going wrong.

Thanks

Xcode Certificate error as No certificate team matching
 
 
Q