BalajiPS @Rob ⚡️ there is app which does the job. I used it for a while but it stopped the dev long time ago, I have requested this feature 4 times since last year. it should come in near future hopefully. that app has single tap, double tap , tripple tap , shake etc stuff all customizable but unfortunately the developer stopped the development. so its old now.
so basically you tap the back double or tripple and based on that , phone does assigned action. like lock or open camera or take screenshot etc. pixel has it I guess.