How do I make a shortcode to display the shop name on Dokan?

There doesn’t seem to be anything wrong with your code. First thing to check is whether it is evaluated at all by adding something like echo "WPSE!!" in the function and see if that string turns up in the source code.

If it does turn up, the problem must be in get_shop_name returning empty. That would be a problem with WooCommerce rather than WordPress proper.

If it does not turn up, the problem most likely is that shortcodes are not evaluated at all in the input field where you are using it. Only in the content field and the default text widget shortcodes are evaluated automatically. In other cases you must specify it like this:

add_filter ( 'input_field_name', 'do_shortcode' );)