The 2nd gen Apple Pencil will ONLY supoort a right click function, using the double tap feature ONLY if the app you are using supports this.
If the app doesn't supoort right click functionality using an Apple Pencil 2, then this will not work.
Use Apple Pencil with your iPad or iPad Pro - Apple Support
Tomorrow, Tuesday, iPadOS is being released and you maybe able to use certain Bluetooth mice with iPadOS and setup the mouse for different buttons.
So, a setting up a right click for certain wireless Bluetooth mice to use ( apps still need to supoort this ) will maybe be possible.
No one here will know until tomorrow.
Best of Luck to You!