Hi Agnes,
When your device asks for a network unlock code with a new sim, it typically means that your handset is locked to your previous provider. If this is the case, you are best to reach out and request the unlock code from the provider you purchased the handset from.
We hope this helps,
Tara