With Concepts for Windows 2021.12 and later, you can set different actions to your Surface Pen Side and Top Buttons.

First, connect your Surface Pen via bluetooth. Go to Pen & Windows Ink settings, and make sure the box "Allow apps to override the shortcut button behavior" is ticked.

Next, go to Concepts. Create a new drawing or open an existing one. Go to Settings. Go to the Stylus tab and set your preferred actions for Side Button and Top Button Click, Top Button Double Click, and Top Button Long Press.