The FDA-approved semaglutide products (Ozempic, Wegovy, and Rybelsus) contain semaglutide in its base form. Some compounded semaglutide has instead been made from salt forms, most often semaglutide sodium or semaglutide acetate, where the drug molecule is paired with a different counter-ion. A salt form is chemically a different active ingredient, and it hasn't been through the testing the base form went through.
Since 2023 the FDA has warned (external link) that it has no information showing these salts have the same chemical and pharmacologic properties as the approved ingredient, and that it knows of no lawful basis for compounding with them. State pharmacy boards issued similar warnings. If you use a compounded product, ask the pharmacy which form of semaglutide it uses and where the ingredient comes from. See how compounded GLP-1 medications are made and pharmacy sources for GLP-1 medications.