Enueue script for bootstrap

If I’m right, you want to get javascript bootstrap via CDN. Try to make it like in the example below. Other scripts you should attach according to this example. You must note your custom scripts should be attached after the bootstrap script if they would be using the bootstrap scripts.

function enqueue_js() {
  wp_enqueue_script( 'bootstrap_js', 'https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js', array(), '5.1.3', true );
  // Here you can enqueue your custom scripts
add_action( 'wp_enqueue_scripts', 'enqueue_js' );