Or just know how to enable lockdown mode. On iOS that’s 5 rapid clicks of the power button, screen on or off, and it vibrates to let you know you got it without looking. Dunno what it might be for android, or if it varies by model.
It ends up like a newly rebooted phone; requires a typed passcode. It also provides quick links to medical ID info and the sos emergency call thing. It may, if you have an ID set up, also have a link to that, but I don’t have that configured so not super sure.
I personally rather trust that my device isn't able to be unlocked without my permission, rather than hope I am able to do some action to disable it in certain situations. The availability of such features is nice, but I would assume I would be incapable of performing such actions in the moment.
My other thought is, how guilty is one perceived if they immediately attempt to lock their phones in such a matter, by a jury of their peers? I rather go the deniability route of I didn't want to share my passcode vs I locked my phone down cause the cops were grabbing me.
This will also put the device in the "before first unlock" state, which will make it harder to extract data, even with physical access. After first unlock some data might be accessed even without the passcode when connecting the phone to a computer
It's also much more secure to reboot (and not unlock) it, should it be taken from you and potentially tried to be broken into or compromised in some way, usually to extract data and perform forensics. A phone that has been unlocked is weaker with protection than one which has been restarted and awaiting first unlock.
You can also set it up so biometrics can be used by apps but not to unlock the phone. That way it's easy to get to your apps and such but trivially more difficult to unlock.