Howto update Mariadb on ubuntu 22.04

I ask here the pro’s if i need to update the mariadb on ubuntu 22.04 and if yes, howto best?

My system:
VPS Server at hetzer.com with ubuntu 22.04
Mautic 5.1.1
PHP 8.2.23
Distrib 10.6.18-MariaDB

I found here a tutorial how to update the database - can anyone confirm, if that works or what to do best?

Note: I made at installation of Mautic 4.4.11 a secure installation - is that an important thing if i would update?:

sudo mysql_secure_installation <<EOF
y
strongpassword
strongpassword
y
y
y
y
y
EOF