I was playing with a Motorola G72 and noticed this feature by accident: double-tap on the back of the phone to trigger a custom action.
Here is a video showing this feature
This is not the same as double tapping the fingerprint scanner. This phone has a front-facing under-display scanner.
It’s very neat and handy, I hope other phones implement this too.
Update: See this comment for a link to an app that enables the feature on many phones.
And to twist for switching between main and selfie camera.