Do I have to worry that root user can login into MariaDB 10.5 without password
Only if you have only localhost access.
When  the attacker has somehow direct baccess to your server, it isn't that much important, but will still remain a nuisance for the hacker.
When you let access from outside the computer, it is vital that there is a strong password, which lets casual users not gain full access to the hole database.
Overall, yes make a passowrd