If your device is network locked it means it can only be used with a specific carrier network. This will usually be the one you purchased your primary SIM plan with. If the device is locked you will not be able to use an eSIM. You must have an unlocked device to be able to use eSIM.
There are several things you can do to get your device unlocked.
Contact your device provider - If your device is locked to a carrier you will require to contact your mobile carrier or the provider of your device. They may have certain requirements or fees associated with unlocking the device.
Use a third-party unlocking service - There are also third-party unlocking services available that can unlock your device for a fee. However, be cautious when using these services as some may not be legitimate or could cause harm to your device.
Purchase a new device - If unlocking your device is not an option or is not cost-effective, you may need to consider purchasing a new device that is compatible with the carrier you want to use.
It is important to note that not all devices can be unlocked, and even if they can, unlocking may void the device warranty or cause other issues. Therefore, it is best to research and consider all options before proceeding.