By default, when you set up a new iPhone 12 or 12 Pro, it activates an Auto 5G mode that only turns on 5G data when it won’t significantly reduce battery life. You can turn this off so that your iPhone uses 5G all the time, and there are also data modes to choose from.