Welcome !
If you don't already know about it I'd suggest visiting https://choosealicense.com/
As you might notice from the existing Flarum extensions, MIT is a very popular choice, but for your own code you are of course free to choose which license you want, including applying multiple licenses or selling it.
If you're forking an existing extension take particular care in its license and Packagist rules about forks.
If you publish code without a license, this greatly limits what users can do with your code, see https://choosealicense.com/no-permission/