To configure user behavior within WikiMedia software… start with the LocalSettings.php file that is typically in your web root folder.
# Specify who can edit: true means only logged in users may edit pages
$wgWhitelistEdit = true;
# only Sysops can create new accounts
$wgGroupPermissions[‘*’][‘createaccount’] = false;
Related Docs from the official manual/wiki: