Add pagination to WordPress archives or search results.

There are several options to do so.

Here are two exemples, on being taken from the twentyfifteen template.

The class is to apply woocommerce styling in case you are using it.

      <div>
         <nav class="woocommerce-pagination bt_search_pagination"> <?php
          // Previous/next page navigation.

          the_posts_pagination(

              array(

                  'prev_text'          => __( 'Previous page', 'twentyfifteen' ),

                  'next_text'          => __( 'Next page', 'twentyfifteen' ),

                  'before_page_number' => '<span class="meta-nav screen-reader-text">' . __( 'Page', 'twentyfifteen' ) . ' </span>',

              )

          );?> 
      </nav></div>
 

A second example more compact:

     <div class="row">
          <div class="col-md-12 text-center">
              <nav class="woocommerce-pagination bt_search_pagination"><?php echo paginate_links(); ?></nav>
          </div>
      </div>

You can add this code in search.php or catregory.php