I assume you’re talking about single posts, not archives – get_next_posts_link
gets the next archive page, get_next_post_link
gets the post next to the current one (note the plural difference).
If so, the next/previous post link functions are just wrappers for get_adjacent_post()
:
<?php if ( $the_query->max_num_pages > 1 ) : ?>
<nav class="prev-next-posts">
<?php if ( $post = get_adjacent_post( false /* In same term? */, '' /* Excluded terms */, true /* Previous */ ) ) : setup_postdata( $post ) ?>
<div class="prev-posts-link">
<a href="https://wordpress.stackexchange.com/questions/208091/<?php the_permalink() ?>"><?php the_title() ?></a>
<?php the_excerpt() ?>
</div>
<?php endif ?>
<?php if ( $post = get_adjacent_post( false, '', false ) ) : setup_postdata( $post ) ?>
<div class="next-posts-link">
<a href="https://wordpress.stackexchange.com/questions/208091/<?php the_permalink() ?>"><?php the_title() ?></a>
<?php the_excerpt() ?>
</div>
<?php endif ?>
<?php wp_reset_postdata() ?>
</nav>
<?php endif ?>