This question could use some clarification as it is not clear what you are trying to achieve. There will not be anything like a 1-to-1 relationship between pubchem CIDs (which refer to chemical compounds) and Uniprot IDs (which refer to protein structures).
Are you interested in interactions between drugs (often chemicals) and proteins (encoded by gene loci)? Or are you interested in the small subset of proteins that are themselves used as drugs perhaps? These might be entered in PubChem as substances instead of compounds. Another option might be Chembl which does have a concept of uniprot to compound mapping.