Currently in progress: Support for Bootstrap 5 is still in development, so it's not yet functional.
Attempting to utilize bootstrap-select (refer) ->
You can find the related issue here -> https://github.com/snapappointments/bootstrap-select/issues/2505
However, you can make it work by meeting specific criteria using a beta version of bootstrap-select as indicated in the GitHub issues:
"bootstrap": "^5.0.0-beta3",
"bootstrap-select": "^1.14.0-beta2"
To clarify, the bootstrap version should be 5.0.0-beta3 or higher and the bootstrap-select version should be 1.14.0-beta2 or above.
You can access the beta version of bootstrap-select here -> https://github.com/snapappointments/bootstrap-select/releases/tag/v1.14.0-beta2
For CDN usage ->
I have successfully implemented it with BS 5.0.1 Below is the code snippet:
// don't forget to include jQuery as well, or it won't work
// the below code is for initializing specific selects - refer to bs-select docs and
// options; if 'selectpicker' class is added, there's no need to initialize like below, so it's
// commented out; use according to your needs
//$('select').selectpicker();
<link href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="31535e5e45424543504171041f011f00">[email protected]</a>/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.14.0-beta2/css/bootstrap-select.min.css" integrity="sha512-mR/b5Y7FRsKqrYZou7uysnOdCIJib/7r5QeJMFvLNHNhtye3xJp1TdJVPLtetkukFn227nKpXD9OjUc09lx97Q==" crossorigin="anonymous"
referrerpolicy="no-referrer" />
<div class="container mt-5">
<select class="selectpicker" multiple aria-label="size 3 select example">
<option value="1">One</option>
<option value="2">Two</option>
<option value="3">Three</option>
<option value="4">Four</option>
</select>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="284a47475c5b5c5a4958681d06180619">[email protected]</a>/dist/js/bootstrap.bundle.min.js" integrity="sha384-gtEjrD/SeCtmISkJkNUaaKMoLD0//ElJ19smozuHV6z3Iehds+3Ulb9Bn9Plx0x4" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-select/1.14.0-beta2/js/bootstrap-select.min.js" integrity="sha512-FHZVRMUW9FsXobt+ONiix6Z0tIkxvQfxtCSirkKc5Sb4TKHmqq1dZa8DphF0XqKb3ldLu/wgMa8mT6uXiLlRlw==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
Note: The class "form-select" from BS5 has been excluded due to unnecessary CSS styles being applied to the select element - however, feel free to test it yourself.
Hopefully this solution works for you...