There are various ways you can get your SIM PUK code which include the following:
You can get the PUK code right from your SIM card package. If you are using the SIM card package, please you need to look at the plastic card that came with the SIM. Sometimes it may be hidden behind a scratchable area. Just scratch that part and the code will be shown.
You can also sign in to your account online or call the customer care to get the PUK code.