<nav class="pagination" role="navigation">
<?php if( get_previous_posts_link() ) { ?>
<div id="prv" class="button pag-btn nav-next"><?php previous_posts_link( 'Previous' ); ?></div>
<?php }
if( get_next_posts_link() ) { ?>
<div id="nxt" class="button pag-btn nav-previous"><?php next_posts_link( 'Next' ); ?></div>
<?php } ?>
</nav>
https://developer.wordpress.org/reference/functions/previous_posts_link/
https://developer.wordpress.org/reference/functions/get_previous_posts_link/