If you have received the Huawei P20 Pro new and with a Sim card, then there is often also a new Sim card pin on this.
If you do not want to remember this new pin, but want to use a code you already know, please proceed as follows:
Change Sim Cards Pin - Instructions
1. Open the Android settings
2. Navigate to "security and privacy" and then to "more
3. Select "Set Sim 1 lock".
4. Type out "Change Pin1 of the Sim Card".
5. Then enter your old Sim Pin and then the new desired pin.
Now you have successfully changed the Sim card pin on your Huawei P20 Pro to a desired pin.