Turnstile callback is not being called

This is my html class

I have added the script to the header

And my function in JS
export function turnstileCallback(token) {
alert(“Turnstile completed”);
console.log("Turnstile completed: ", token);
// Aquí puedes agregar lógica para mostrar los campos de ingreso
uiWidget.start(‘#firebaseui-auth-container’, uiConfig);

The widget does apparently work but when it is automatically checked and all seems fine, I realize that my JS function doesn’t ever get called. What am I doing wrong?