The function responsible for opening WooCommerce content wrapper is attached to woocommerce_before_main_content action hook with priority 10.
You can wrap your code into function and attach it to that hook with priority less than 10.
add_action( 'woocommerce_before_main_content', 'se337291_before_content_wrapper');
function se337291_before_content_wrapper()
{
// display something only on single product page
if ( ! is_product() )
return;
//
// your code here...
//
}
Another option is to copy the single-product.php file to the theme directory and modify it. Here you will find information on how to overwrite templates.