Setting a PIN to lock the screen
In general, most modern devices will ask you to set a PIN and potentially a biometric method such as face recognition or fingerprint recognition as part of your initial setup of the device. Often, setting a PIN will either enable encryption or allow encryption to be enabled.
For other mobile devices or if the above information does not seem correct for your device refer to the manufacturer or network provider web site.