Make a global shortcut for a particular app From Apple KB - Use global keyboard shortcuts on Mac,

Note: You can create keyboard shortcuts only for existing menu commands. You cannot define keyboard shortcuts for general purpose tasks such as opening an app or switching between apps.

I want to know if there is a utility or a hack to make a shortcut for a particular app work even when the app is minimized. In my case, I am trying to assign a shortcut to OBS to start/stop recording even when minimized.
To explain better, consider this scenario. My active app is Firefox (or any other app). OBS is running in the background and is visible in the top menu bar. I press a shortcut key combination and OBS starts to record screen. Currently, this doesn't works if the active app is not OBS itself. The reason is, this shortcut is local to OBS. I want a way to assign it as a global shortcut.
It sounds like you want to switch to the OBS Studio App so you can switch scenes, etc.
You can use Automator to create a custom service to launch the application of choice and bind a global keyboard shortcut to do so.

Open Automator, select New Document and Choose Quick Action (Service)
In Workflow Receives (Service Receives) drop-down list select No Input
Drag Launch Application from the Actions list to the right side
Select the OBS App as the Launch Application
Save the Automator Quick Action (Service) as &quot;Launch OBS&quot;
In System Preferences -&gt; Keyboard -&gt; Shortcuts -&gt; Services scroll down and find Launch OBS and set a keyboard shortcut for it.

This will open OBS and bring up the minimized window and it will unhide it as well.

There's a great deal of potential solutions that may be even more useful in controlling OBS. If you rethink your workflow a bit, the deeper problem is controlling OBS while you are streaming or recording.
OBS has a websocket API and can be remotely controlled via a web browser but it can also be remotely controlled via iOS/iPad Apps as well as actual hardware controller boxes (stream deck or MIDI controller) with a myriad of programable buttons and dials to control OBS and a lot more.  You can add an inexpensive second monitor, even an old iPad setup as a second monitor and put OBS on the iPad.