Pagination in modular page

Hi.
I would like to implement pagination for a blog list module in a modular page. The scenario would be the one seen in the image.

This is the current code I have in the module template:

{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog_page'))) %}
{% set collection = blog.collection() %}
{% set new_base_url = blog.url == '/' ? '' : blog.url %}
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true)  %}
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}


<div class="container">
    {% embed 'partials/layout.html.twig' with {blog: page} %}
        {% block item %}
            <h4 class="font-weight-bold title h4 mb-4 spanborder">
            <span>{{page.title|raw}}</span>
            </h4>
            {% for child in collection %}
                {% include 'partials/blog-list-item.html.twig' with {'base_url':new_base_url, page: child, title_level: 'h4'} %}
            {% endfor %}

            {% if show_pagination and config.plugins.pagination.enabled and collection.params.pagination %}
                <div class="mt-5">
                <!-- Pagination links -->
                    {% include 'partials/pagination.html.twig' with {'base_url': new_base_url, pagination: collection.params.pagination} %}
                </div>
            {% endif %}

        {% endblock %}

        {% block sidebar %}
            {% include 'partials/sidebar.html.twig' %}
        {% endblock %}
    {% endembed %}
</div>

Everything works fine except pagination.

Is it possible to set pagination for a blog module to a modular page?
Thanks.