Why is script inside a module not running

I am making a firebase chat app to introduce how to use firebase to a coding community, and when I put a module attribute in the script tag it does not run.

This is my code

<script type="module">
    import {initializeApp} from "https://www.gstatic.com/firebasejs/9.20.0/firebase-app.js";
    import { getAnalytics } from "https://www.gstatic.com/firebasejs/9.20.0/firebase-analytics.js";
    import { getDatabase, ref, set } from "https://www.gstatic.com/firebasejs/9.20.0/firebase-database.js";
    const firebaseConfig = {
        apiKey: "AIzaSyDt6H4JWdhibuN-L50Tg4bOYM4tXfttzEk",
        authDomain: "primavera-challenge-2.firebaseapp.com",
        projectId: "primavera-challenge-2",
        storageBucket: "primavera-challenge-2.appspot.com",
        messagingSenderId: "209200120916",
        appId: "1:209200120916:web:db73a2d63d640de53819c1",
        measurementId: "G-NYN0KXDTX0"
    };
    
    
    const app = initializeApp(firebaseConfig);
    const analytics = getAnalytics(app);
    const db = getDatabase()
    
    console.log(app, db)
</script>

I tried using a nomodule attribute on a script tag like this,

<script nomodule>console.log("No Module Test")</script>

but there was no output to the console either. I am working on a site that has the connect-src in the csp as

*.kasandbox.org *.sitename.org 'self' cdn.rawgit.com rawgit.com ajax.googleapis.com cdn.jsdelivr.net cdnjs.cloudflare.com 'unsafe-inline' 'unsafe-eval'

(site name replaced with sitename.org)