Trying to add taxonomy terms to search results page

I’m having some trouble understanding your code. It looks like you’re:

  1. Looping over every search result.
  2. For each result, getting all tempo terms.
  3. For each tempo, querying all posts that belong to that term.
  4. Doing nothing with the queried posts.

This is all extremely inefficient and doesn’t do anything like what you say you’re trying to do.

If you want to display the list of tempos assigned to a search result in search.php you just need to use the_terms(). The result should look like this:

<div class="search-page-content">
    <?php if ( have_posts() ) : ?>
        <?php while ( have_posts() ) : the_post(); ?>
            <h2>
                <a href="<?php the_permalink(); ?>">
                    <?php the_title(); ?>
                </a>
            </h2>
            <div class="search-meta-section">
                <div class="search-tempo">
                    <?php the_terms( get_the_ID(), 'tempo' ); ?>
                </div>
                <div class="search-category">
                    <?php the_category(); ?>
                </div>
            </div>
            <?php the_content(); ?>
        <?php endwhile; ?>
    <?php else : ?>
        <p>
            <?php esc_html_e( 'It seems we can\'t find what you\'re looking for.', 'hello-elementor' ); ?>
        </p>
    <?php endif; ?>
</div>