Note that many of the reasons for the existence of this script no longer apply. In particular, from MariaDB 10.4, Unix socket authentication is applied by default, and there is usually no need to create a root password. See Authentication from MariaDB 10.4.
MariaDB starting with 10.4.6
MariaDB starting with 10.5.2
See mariadb-secure-installation for details.