Random loop with code to prevent duplicate output returns no output at all from time to time

The problem is how you’re doing the exclusion. It’s happening after you’ve grabbed your second quote. If it matches the first quote, it just silently fails to appear.

Try this for your 2nd block:

<blockquote class="container" style="color:#1f8665;">
<?php
    $args = array(
        'post_type' => 'quotes',
        'thesections' => 'yoga',
        'posts_per_page' => 1,
        'post__not_in' => array( $do_not_duplicate ),
        'orderby' => 'rand'
    );
    $the_query = new WP_Query( $args );
    if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
    <q><?php the_field( 'quote_text' ); ?></q><br><cite><?php the_field( 'quote_origin' ); ?></cite>
    <?php endwhile;
            wp_reset_postdata();
        else: ?>
        <p>DB error</p>
    <?php endif; ?>
</blockquote>

The post__not_in parameter will prevent WP_Query from selecting your $do_not_duplicate post in the first place.

Reference

deneme bonusu veren sitelerbahis casinomakrobetceltabetpinbahispolobetpolobet girişpinbahis girişmakrobet girişpulibet girişmobilbahis girişkolaybet giriş