the_posts_pagination() not working in wpquery

Thanks to @Buttered_Toast i’ve managed to get it work by changing:

<?php the_posts_pagination( array(
    'mid_size'  => 2,
    'prev_text' => __( 'Back', 'textdomain' ),
    'next_text' => __( 'Onward', 'textdomain' ),
) ); ?>

to:

<?php  echo paginate_links( array(
    'base'         => str_replace( 999999999, '%#%', esc_url( get_pagenum_link( 999999999 ) ) ),
    'total'        => $postslist->max_num_pages,
    'current'      => max( 1, get_query_var( 'paged' ) ),
    'format'       => '?paged=%#%',
    'show_all'     => false,
    'type'         => 'plain',
    'end_size'     => 2,
    'mid_size'     => 1,
    'prev_next'    => true,
    'prev_text'    => sprintf(  __( '<', 'text-domain' ) ),
    'next_text'    => sprintf(  __( '>', 'text-domain' ) ),
    'add_args'     => false,
    'add_fragment' => '',
    ) );
wp_reset_postdata(); ?>