Filter the script tag with script_loader_tag to output type="module" for a specific handle.

function lotgrafix_script_as_module( $tag, $handle, $src ) {
    if ( 'lotgrafix-main' !== $handle ) {
        return $tag;
    }
    return '<script type="module" src="' . esc_url( $src ) . '"></script>';
}
add_filter( 'script_loader_tag', 'lotgrafix_script_as_module', 10, 3 );
«
»