Feature summary
https://www.mediawiki.org/wiki/Extension:TitleBlacklist
The TitleBlacklist extension allows wiki administrators to block the creation, movement and upload of pages, the title of which matches one or more regular expressions, as well as blocking creation of accounts with matching usernames.
Benefits:
This has become core functionality, so should be integrated into the core. It won't be a massive amount of extra code.
It might also give you the chance to change it to disallowlist rather than blacklist.
Subtask of T28751.