Using variable as shortcode parameter

The shortcode function behind that shortcode will need to be able to accept an argument so it can return your variable in the expected place.

If this is a custom shortcode function you wrote, you’ll have to make that adjustment. If its a third party shortcode, you’ll need to look at their documentation and see if its possible.