how do I remove the shipping from woocommerce thankyou page and from the email

There are two options

  1. you can do it with custom code.

For the shipping remove form thank you page you need to override the template.

This is all based on the thankyou.php of woocommerce.
You need to delete the lines of code you do not wish to be shown and upload them to the following directory

wp-content/themes/your_child_theme/woocommerce/checkout/

To remove the shipping total line from email notifications please use the below filter.

add_filter( 'woocommerce_get_order_item_totals', 'filter__customize_email_order_line_totals', 1000, 3 );
function filter__customize_email_order_line_totals( $total_rows, $order, $tax_display ){
    // Only on emails notifications
    if( ! is_wc_endpoint_url() || ! is_admin() ) {
        // Remove shipping line from totals rows
        unset($total_rows['shipping']);
    }
    return $total_rows;
}

Please add code in the function.php file of your active theme.

  1. Simply you can change the settings from WooCommerce -> Settings -> General
    In the Shipping location please select Disable shipping and shipping calculation.
    Here I have shared the screens-shot for your reference:

enter image description here