Custom post type appearing within the previous one on archive.php

Your closing tags for the card and card body divs are outside of the loop. try this:

<?php
get_header();

if (have_posts()) :
   while (have_posts()) :
    ?>
    <div class="card container">
        <a href="https://wordpress.stackexchange.com/questions/333813/<?php

        // this conditional outputs a different link url for CPT"resources'

            if (is_post_type_archive( $resources )) {
                echo 'https://' .  get_field('website');
            } else {
                echo get_the_permalink();
            }
        ?>">
        <div class="card-body row"><?php      
        the_post();

            ?>
            <div class="col-sm img-fluid"><?php 
                the_post_thumbnail('medium');
            ?></div>
            <div class="col-sm p-2 m-0"> 
            <h2 class="card-title text-center"><?php the_title(); ?></h2>
            </a>
            <?php


// This section is supposed to get all custom fields and display them if they exist

    $fields = get_fields();
            if( $fields ): ?>
                <ul>
                    <?php foreach( $fields as $name => $value ): ?>
                    <li><?php
                    echo $value;
                    ?></li>
                    <?php endforeach; ?>
                </ul>
            <?php 
            endif;          
            ?><p class="card-text"><?php the_excerpt(); ?></p>
            </div>
        </div> <!-- card body -->
    </div><!-- card -->
    <?php
    endwhile;
endif;

?>

<?php

get_footer();

?>