How to use boostrap 5 settings via javascript in carousel (no vue-boostrap)?

Problems using boostrap 5 carousel

Hello techs, I am new in Nuxtjs the problems that I have is when I am using carousel boostrap 5, and I want to change some options with javascript.

How to use javascript vanilla in script tag?

I want to use this code, but I have problems.

var myCarousel = document.querySelector(’#myCarousel’)

var carousel = new bootstrap.Carousel(myCarousel, {
interval: 2000,
wrap: false
})

Thanks techs I hope I was clear, and forgive about my English. XD!