The thing is that swiper does not render after the liquid gets rendered So you should add an event listener as 'load' and initialize it in there as this:window.addEventListener("load", function(){
const swiper = new Swiper('.your_swiper_class', {})...