featured image background

You can try wp_get_attachment_image_src this for getting Feature Image
URL. Here is the Full code.

<?php
function propertunity_featured_post() {
      $featured_post_id = 2860;
      $featured_post = get_post($featured_post_id);
      $featured_post_url = get_permalink($featured_post_id);
      $featured_post_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($featured_post_id, 'thumbnail') );
      echo "<div class="card">
          <div class="card-header" style="background-color: #f8f8fc; overflow: hidden;">
            <a href="" . $featured_post_url . "">
              <div class="card__image" style="background-image: url(" " . $featured_post_image_url[0] . " ');'></div>       
            </a>
          </div>
       </div>";
}
?>