How to set up a pagination automation?

So I’m building a website for a bakery that contains a shop page and the admin can add products to the shop page. Every time after adding a specific amount of products i want the website to create automatically a new page of products. How do i do that?

<div class="row">
                    <div class="col-lg-6 col-md-6 col-sm-6">
                        <div class="shop__pagination">
                            <a href="#">1</a>
                            <a href="#">2</a>
                            <a href="#">3</a>
                            <a href="#"><span class="arrow_carrot-right"></span></a>
                        </div>
                    </div>
                    <div class="col-lg-6 col-md-6 col-sm-6">
                        <div class="shop__last__text">
                            <p>Showing 1-9 of 10 results</p>
                        </div>
                    </div>
                </div>

this is the html code that does nothing actually.