Based on my knowledge, there are three components determine whether a user can upload a custom app to a team: User custom app policy, Team custom app setting and Org-wide custom app setting.
We recommend you check if you turn on Upload custom apps in Teams admin center(Go to Teams apps > Setup policies). Then check if you select the Allow members to upload custom app check box. It shows like the following picture:
Finally, go to Teams apps> manage apps in Teams admin center and click Org-Wide app settings, make sure you turn on Allow interaction with custom apps under Custom apps.
For more details about Manage custom app policies and settings in Microsoft Teams, you can refer to: