To avoid repeatedly unlocking your phone when you are at familiar and trusted locations (like home or work), use a Extend Unlock. You can still manually lock the phone at trusted places when needed.
Make sure you have:
Tap Security & privacy > More security & privacy > Extend Unlock.
If you don't see Extend Unlock, try the following:
Set up your places:
To lock your phone when you're in a trusted place, on the lock screen, tap
. The phone stays locked until the next time you manually unlock it.
Remove the location from your trusted places: