Hi @Pacifique_Hategekima,
Thank you for your questions!
If the user role doesn’t have the authority to ‘Add/Update Public’ metadata then the creation of metadata using a user account with that role will not be automatically public, so my suggestion is to remove the authority from the user role. For more info on creating/editing a user role, please see docs: Home - DHIS2 Documentation
I think the easiest and fastest way to achieve this would be using the API. This is the API Sharing chapter in the docs: Sharing - DHIS2 Documentation
You’re welcome, please let me know if you have any more questions!