Use custom query if main search query returns zero results in wordpress

Exactly right about resetting it! You should use wp_reset_query(). Try this:

$num_res = $wp_query->post_count;
$get_search_term = get_search_query();

// No more work required for the query, so...
wp_reset_query();

if($num_res == 0)
{
    $args = array(
        'post_type'     => 'resources',
        'meta_key'      => 'resource_txt',
        'meta_value'    => $get_search_term,
        'meta_compare'  => 'LIKE' );
    $custom_query =  new WP_Query( $args );

    // Do stuff here.

    wp_reset_query();
}

It is a good habit to reset the query once you’ve retrieved what you need from it.

tech