<?php the_posts_pagination( array(
    'mid_size'  => 2,
    'prev_text' => __( '<i class="fas fa-chevron-left"></i>', 'elms' ),
    'next_text' => __( '<i class="fas fa-chevron-right"></i>', 'elms' ),
) );