To lock the iPhone screen, press the Side button on the right side of the device once. This instantly turns off the display and locks the phone. You can also enable Auto-Lock in Settings > Display & Brightness to lock the screen automatically after a set time.