That depends on the package you installed. Packages might put configuration and data in different places from the defaults that Webmin knows about. You’ll need to figure out where those places are, and update the module configuration for the Webmin Mariadb module (click the gear icon in the upper left corner of the Mariadb module front page).
You’ve gone off-roading, you’ll need to do some work. I don’t use any Mariadb version except the one that comes from my distribution provider, so I have no specific advice to offer.
For anyone else following along: the best option for upgrading anything is to choose a newer OS. In this case Ubuntu 24.04 would provide a new Mariadb (and newer everything else), and it would all be in places that Webmin already knows about.