Keyboard shortcut to toggle an app open and closed (without quitting or hiding)

Example: I want to make a keyboard shortcut to toggle launch/close (not quit) an app. Currrently, this seems unachievable as BTT won't reopen an app through a launch command if the app is already open. My current workaround is to remap the shortcut (for that app only) to Cmd+H for hiding the app, but I'm afraid this will have performance issues as there's a difference between hiding and closing an app.

So for instance, I use Cmd+Opt+T to toggle the Tot app from launch to hide, and would like to create similar keyboard shortcuts do this for all my customized launch shortcuts without quitting or hiding them. Is this possible?

On macOS you can close windows but you can only quit apps.

Maybe have a look at the "Show/Hide Specific Application" action

Thanks. Are there differences in performance or RAM usage between closing windows and hiding them or is this just the same thing? I was thinking hiding an app would make greater RAM usage.