In product loop pages like shop and category pages, the product title is displayed within h2 tags. You can use this code snippet to change the h2 tag to a span tag. You can also modify the code to use any other tag instead of the span tag.
Since WooCommerce does not have a filter for the function that displays the WooCommerce loop product title, we’ll be overriding the core function itself. woocommerce_template_loop_product_title
is the WooCommerce’s core function and we are overriding it like below: