<!-- Bootstrap 5 -->
I searched for a long time before I was able to solve the problem.
|- Check the version of bootstrap. Take attention that in bootstrap 5
|- changed data-toggle to data-bs-toggle and data-target to data-bs-target
|- data-bs-dismiss