Why would you dial that in the first place for a new phone !?
Go to Settings > Network > Mobile networks > Preferred network type - Set it as 2G / 3G according to your requirement.
If there is no network,
Dial *#*#4636#*#* menu and hit the 3 dots on Top-Right > Select Automatic. then select "WCDMA Preferred" in Preferred network type.