Do proteins generally contain phosphorus and sulfur?
Of the 22 known proteinogenic amino acids, all contain hydrogen, carbon, nitrogen and oxygen. Some (methionine and cysteine) contain sulfur while one (selenocysteine) contains selenium. None contain phosphorus, but this element can be incorporated by:

Post translational phosphorylation of various residues. This often allows/prevents binding of other proteins and/or triggers a conformational change in the target protein. It is also necessary for proper folding of some proteins (example). Sulfur can also be incorporated in a similar manner (sulfation).

Incorporation of phosphorus containing prosthetic groups. This can occur covalently and is necessary for the function of some proteins. Sulfur can also be incorporated as part of prosthetic groups.


You may also consider the other elements necessary for the structure/function of many proteins: iodine in thyroglobulin, iron in hemoglobin, etc...