Lock screen without using physical button Android 10
There's a built-in option that comes with Android 10 which allows you to lock the screen without using the bottom.

In your phone settings, go to "Accessibility" and enable "accessibility menu".

This will now put an icon on the the right side of your navigation bar. Pressing on the icon will bring up a menu, with one of the options as "lock screen". Pressing on that will lock your screen just like pressing the power button would. You also have the option to power off the phone in that same menu.

See screenshot below.