You are looking for Enclosing Shortcode. Here is an example of how you can achieve this.
function example_shortcode($atts = [], $content = null)
{
// do something to $content
// run shortcode parser recursively
$content = do_shortcode($content);
// always return
return $content;
}
add_shortcode('example', 'example_shortcode');
Now you can use it like [example] Here is my content [/example]
Read more about add_shortcode()
here