There are two ways to generate a UPC, depending on whether you require your own identification number for your business.
If you do, you need to first obtain a paid membership with the GS1 US, a global standards organization and the official provider of UPC codes. Following that, you can purchase UPCs from them. UPCs purchased directly from GS1 US contain your own, unique identification number.
If you don’t, some companies purchase UPCs in bulk from the GS1 US and sell them to other businesses. You can get UPCs from them to save yourself the hassle and cost of paying for and joining the GS1 US.