Making pagination with php and mysql

I'm making a movie website and want to make the limit of movies for example 10 per page but every pagination tutorial or guide I find shows only how to do this with lists, I want to do this with cards so it looks like it does on other movie websites. Any advice or help would be appreciated!

Here is the code that I want to make into a pagination:

<?php 
include('db.php');
include('header.php');
include('footer.php');
?>
<h1 style="color: green;">MOST RECENTLY ADDED</h1>
<div class="content">
    <div class="row">


    <?php 

    $query = "SELECT * FROM movie";
    $run = mysqli_query($con,$query);
    if ($run) {

        while($row = mysqli_fetch_assoc($run)){
            ?>

<div class="col">
    <div class="card border border-success" style="width: 18rem;text-align: center; background-color:#343a40;">
  <img class="card-img-top" height="300px" width="100px" src="admin12312/thumb/<?php echo$row['imgpath']; ?>" alt="Card image cap">
  <div class="card-body">
    <h5 class="card-title" style="color: green;"><?php echo$row['name']; ?></h5>
<br>

    <a href="viewmovie.php?id=<?php echo $row['id']; ?>" class="btn btn-outline-success my-2 my-sm-0">Watch</a>
  </div>
</div>
</div>

            <?php

        }

    }

     ?>
</div>
</div>