the javascript ofc
$(document).ready(function() {
$('.js-example-basic-single').select2({
theme: "bootstrap-5"
});
});
the HTML
<select class="js-example-basic-single bg-dark" style="background-color: #343a40 ! important;" name ="state"></select>