Building an Imageslide but with Modules

Hey, so i´m currently working on a Website and I want to implement an imageslider but instead of images I want it to display module so you can add “news” or something like that. It should be infinite.
My current html Twig is:

{% for module in page.collection() %}
{{ module.content|raw }}
{% endfor %}

The idea is, that i check for modules that fit and it should display every module in a seperate slide.
My problem is, it doesnt show me any Modules and when i try to debug it with:
{% else %}

No Modules found


it always says “No Modules found”.

Anyone know how to fix this? or know what i am doing wrong?
Thanks for the help.

<div class="swiper-container2">
    <div class="swiper-wrapper2">
        {% for module in page.collection() %}
    {{ module.content|raw }}
{% else %}
    <p>Keine Module gefunden.</p>
{% endfor %}

    </div>
    <div class="swiper-pagination2"></div>
    <div class="swiper-button-next2"></div>
    <div class="swiper-button-prev2"></div>
</div>

{{ dump(page.collection()) }}

<script>
  var swiper = new Swiper('.swiper-container2', {
    loop: true,
    pagination: {
      el: '.swiper-pagination2',
      clickable: true,
    },
    navigation: {
      nextEl: '.swiper-button-next2',
      prevEl: '.swiper-button-prev2',
    },
  });
</script>


What’s your folder structure and what do you get with {{ dump(page.collection()) }}?