Press the Side button
Press the Top button on older iPhones
Press the Sleep/Wake button on older iPhones
Set Auto-Lock in Settings > Display & Brightness > Auto-Lock
Use AssistiveTouch and tap Device > Lock Screen
Use Back Tap with a Shortcut to lock the screen
Use Siri and say “Lock the screen”
