Paste the following code in functions.php:

/* Display remaining amount for free shipping in cart */
add_action( 'woocommerce_before_cart', 'bbloomer_free_shipping_cart_notice' );  
function bbloomer_free_shipping_cart_notice() {
$min_amount = 25; //change this to your free shipping threshold
$current = WC()->cart->cart_contents_total;
if ( $current < $min_amount ) {
   $added_text = esc_html__('Il ne manque que', 'woocommerce' ) . wc_price( $min_amount - $current ) . esc_html__('pour profiter de la livraison gratuite.', 'woocommerce' );
   $return_to = apply_filters( 'woocommerce_continue_shopping_redirect', wc_get_raw_referer() ? wp_validate_redirect( wc_get_raw_referer(), false ) : wc_get_page_permalink( 'shop' ) );
   $notice = sprintf( '%s %s', esc_url( $return_to ), esc_html__( 'Continue Shopping', 'woocommerce' ), $added_text );
   wc_print_notice( $notice, 'notice' );
}
}

Edit text and shipping threshold as needed.

Source: https://businessbloomer.com/woocommerce-add-need-spend-x-get-free-shipping-cart-page/