Power off. Hold Volume Up + Power. In TWRP, wipe Dalvik, Cache, System, Data. (Never wipe Vendor or Product).
Use DC-Unlocker. Install the client, connect the phone in fastboot mode, pay for credits, and retrieve the unlock code. Command: fastboot oem unlock [YOUR_CODE] Custom Rom For Huawei P40 Pro
Unless you are a veteran flasher who understands fastboot , ramdisk , and the specific quirks of Kirin 990 SoCs, you should avoid true custom ROMs. The risk of hard-bricking your phone is high, and the community support is low compared to Snapdragon devices. Power off