WooCommerce renders messages by using woocommerce_show_messages()
function. This function is hooked to woocommerce_before_single_product
action. So if you don’t want to render messages before single product, you need to remove that hook for the action.
remove_action( 'woocommerce_before_single_product', 'woocommerce_show_messages' );
If you want to render messages in another place, then just call woocommerce_show_messages()
function in desired place.