wc_get_orders is the query you should be using

Orders are posts, so WP_Query works and every example on the internet uses it — with a post_type of shop_order, a meta query for the customer, and a hard-coded list of status slugs that changes between versions.

$orders = wc_get_orders( array(
    'customer' => $customer_id,
    'status'   => array( 'processing', 'on-hold' ),
    'limit'    => 20,
    'orderby'  => 'date',
) );

foreach ( $orders as $order ) {
    $order->get_total();
}

It returns order objects rather than posts, so the methods are there without a second lookup, and it insulates the query from how orders happen to be stored — which is the point, because that is exactly what changes in later versions. Status strings are accepted with or without the wc- prefix, which is one of the few places WooCommerce is forgiving about it.