If editing the Keymap seems too cumbersome, a more straightforward method is to use an application. Link
Before using Blender 4.2.3, I used game engines such as Unity. So, I wanted to use a right-click and “hold” to pan or rotate within the viewport. I also wanted to use a single right-click to open the options as usual. Lastly, I wanted the changes to only apply to Blender.
1. Change 3D View Rotation
Under Edit -> Preferences -> Keymap, scroll down until you find “3D View” -> “3D View (Global)”

Find “Rotate View” with “Middle Mouse” and change it to “Right/Click Drag”

2. Change 3D View Pan
Under “3D View” -> “3D View (Global)” -> “Pan View (Mouse)”, change it to “Right/Press”

Under “3D View” -> “3D View (Global)” -> “Set 3D Cursor”, change it to “Middle/Press” (This is done because setting the pan view as above will also set the 3D Cursor while panning)

3. Change Object Menu
Scroll down until you find “Object Mode” -> “Object Mode (Global)”

Under “Object” with “wm.call_menu”, change it to “Right/Click”

4. Change Edit Mode Rotation (Mesh)
Scroll down until you find “Mesh” -> “Mesh (Global)”

Under “Call Menu” with “wm.call_menu”, change it to “Right/Click”

5. Change Sculpt Mode Menu
Scroll down until you find “Sculpt” -> “Sculpt (Global)”

Under “Sculpt” with “wm.call_penel”, change it to “Right/Click”

Done! The right-click will act as expected. Drag and hold a right mouse button to pan or rotate within the viewport, and click a right mouse button to open the options.
I only changed the Keymaps for my 3D modeling use cases. There might be more Keymaps to change in different uses, but the gist is the same.